Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Compiler and Runtime Migration Guide


Change in file handling for COBOL programs with RECORDING MODE U under OS/390, Version 2 Release 10

When you move from Language Environment for OS/390, Version 2 Release 9 or earlier to Language Environment for z/OS, COBOL programs that process RECFM=VB or FB data sets with RECORDING MODE U might work differently. The application program might require some modification to work correctly in either of the following cases:

This combination of RECORDING MODE and RECFM created a mismatch that coincidentally worked in some cases under Language Environment for OS/390, Version 2 Release 9 or earlier, and some applications exploited this behavior. Programs that are compiled with CMPR2 do not have this problem, but inconsistent behavior might occur if the PTF for PQ49479 is not installed.

To determine if this problem is present in your applications, search for RECORDING MODE U in your source programs. If you do not find references to RECORDING MODE U, the chances that you will run into this problem are minimal. However, if you do have programs that use RECORDING MODE U, you need to view the DD statement and maybe the data set attributes for the file.
Your changes must ensure that the RECORDING MODE of the file is consistent with the RECFM of the data set when the file is opened. Following are your options for modifying your applications:

In true format U processing, each read from the file receives an entire block (because format U records are written so that each block is a single record) which will be passed back to the application. If the data set is variable blocked (RECFM=VB) or fixed blocked (RECFM=FB), the block that is returned to the application will consist of multiple records that must be deblocked by the application. Additionally each write to a format U file will create a new block for each record. If a write is done to an existing file that was originally written as RECFM=VB or RECFM=FB, the blocks written as RECFM=U will contain a single record, whereas those written as RECFM=FB or RECFM=VB can contain multiple records. The RECFM will also be changed to U if a write is done.

A mismatch between the RECORDING MODE of the file and RECFM of the data set can also exist when RECORDING MODE V or F is coded in your COBOL source and the data set is RECFM=U. Although this coding might currently work, it is recommended that the RECORDING MODE and RECFM are changed to match. In the future, changes to Language Environment might cause your applications with a mismatch between the RECORDING MODE for the file and the RECFM for the data set to fail.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)