Upgrading programs that use SIMVRD support

This section describes the actions to upgrade programs that use SIMVRD support. Support for COBOL simulated variable-length relative-record data sets (RRDS) is removed for programs compiled with Enterprise COBOL Version 4 or later. These files must be changed to VSAM RRDS files.

In COBOL compilers that supported the NOCMPR2 compiler option before Enterprise COBOL Version 4, it was possible to use COBOL simulated variable-length RRDS using a VSAM KSDS when you used the SIMVRD runtime option support.

The coding that you use in a COBOL program to identify and describe VSAM variable-length RRDS and COBOL simulated variable-length RRDS is similar. With Enterprise COBOL Version 4 you must use VSAM variable-length RRDS support. In general, the only action to migrate from COBOL simulated variable-length RRDS to VSAM variable-length RRDS support is to change the IDCAMS definition of the file.

Table 1. Steps for using variable-length RRDS
Step VSAM variable-length RRDS COBOL simulated variable-length RRDS
1 Define the file with the ORGANIZATION IS RELATIVE clause. Same
2 Use FD entries to describe the records with variable-length sizes. Same, but you must also code RECORD IS VARYING in the FD entry of every COBOL program that accesses the data set.
3 Use the NOSIMVRD runtime option. Use the SIMVRD runtime option.
4 Define the VSAM file through access-method services as an RRDS. Define the VSAM file through access-method services as follows:

DEFINE CLUSTER INDEXED
KEYS(4,0)
RECORDSIZE(avg,m)
avg
Is the average size of the COBOL records; strictly less than m.
m
Is greater than or equal to the maximum size COBOL record + 4.

In step 2 for simulated variable-length RRDS, coding other language elements that implied a variable-length record format did not give you COBOL simulated variable-length RRDS. For example, the following elements alone did not cause the use of simulated variable-length RRDS access, and therefore did not require the SIMVRD runtime option:

  • Multiple FD records of different lengths
  • OCCURS . . . DEPENDING ON in the record definitions
  • RECORD CONTAINS integer-1 TO integer-2 CHARACTERS

Use the REUSE IDCAMS parameter for files that contain records and that you will open for output.

  • Define the file with the ORGANIZATION IS RELATIVE clause.
  • Use FD entries to describe the records with variable-length sizes.
  • Use the NOSIMVRD runtime option.
  • Define the VSAM file through access-method services as an RRDS.

Errors: When you work with simulated variable-length relative data sets and true VSAM RRDS data sets, an OPEN file status 39 occurs if the COBOL file definition and the VSAM data-set attributes do not match.

For more reference information about the commands for using variable-length RRDS, see z/OS® DFSMS: Access Method Services for Catalogs.