Allocating OSAM data sets

To allocate OSAM (overflow sequential access method) single or multiple volumes, use JCL when the data set is loaded using the SPACE parameter.

If your installation control of DASD storage and volumes is such that the OSAM data sets must be reserved ahead of time, or if you decide that a message queue data set requires more than one volume, the OSAM data sets can be preallocated.

Restrictions:

If you are preallocating a multiple-volume data set, allocate extents on all volumes to be used. The end of the data set must be correctly indicated in the data set control block (DSCB) on the last volume.

The suggested method is to use the IEFBR14 utility once for each volume on which space is required; do not just use the IEFBR14 utility and specify a DD statement for a multivolume data set. This action only puts an extent on the first volume and does not indicate which volume is the last volume of the data set.

You can allocate OSAM data sets to take advantage of z/OS® DFSMS support for large format sequential data sets, which can exceed more than 65 535 tracks per volume. This allows more data to be stored on fewer volumes, helping to minimize sequential data sets that grow large and span many volumes of storage hardware.

To enable support for DFSMS large sequential data sets, specify DSNTYPE=LARGE in the JCL that allocates the OSAM data sets, and bring the data sets online as follows:

You can enable OSAM data sets to use extended address volumes (EAVs) that are available in z/OS V1.12 or later. To enable an OSAM data set to use EAVs, specify an EAV volume on the VOLSER parameter when you allocate the data set. In addition, you can specify the attribute EATTR to indicate whether the data set supports extended attributes.

Restriction: Data sets with EATTR=OPT specified on them cannot be shared with an IMS Version 11 system because that version does not support extended attributes.

Sample OSAM data set allocation JCL displays the recommended OSAM data set allocation JCL. If you are allocating a large sequential OSAM data set, see Sample JCL to allocate a large sequential OSAM data set.

If the OSAM data sets must be cataloged, use IEHPROGM or Access Method Services (AMS) to ensure that all volumes are included in the catalog entry.

Attention: Do not reuse multivolume OSAM data set extents without scratching and reallocating the space first. Otherwise, an invalid end-of-file mark can be left in the DSCB of the last volume of the data set, which causes an embedded EOF mark somewhere in the middle of the data set.

Sample OSAM data set allocation JCL

//OSAMALL  JOB
//S1      EXEC PGM=IEFBR14
//EXTENT1   DD DSNAME=OSAM.SPACE,DISP=(,KEEP),
//             UNIT=SYSDA,VOLSER=AAAAAA,
//             SPACE=(CYL,(10,5))
//S2      EXEC PGM=IEFBR14
//EXTENT2   DD DSNAME=OSAM.SPACE,DISP=(,KEEP),
//             UNIT=SYSDA,VOLSER=BBBBBB,
//             SPACE=(CYL,(15,5))
⋮
//LAST    EXEC PGM=IEFBR14
//EXTENTL   DD DSNAME=OSAM.SPACE,DISP=(,KEEP),
//             UNIT=SYSDA,VOLSER=LLLLLL,
//             SPACE=(CYL,(15,5))

Sample JCL to allocate a large sequential OSAM data set

//OSAMALBG   JOB
//S1        EXEC  PGM=IEFBR14
//EXTENT1  DD  VOL=SER=AAAAAA,SPACE=(CYL,(20,5)),UNIT=3390,
//          DSN=OSAM.LARGE.SPACE,DISP=(,KEEP),DSNTYPE=LARGE