Status subparameter

NEW
Indicates that a new data set is to be created in this step.
OLD
Indicates that the data set exists before this step and that this step requires exclusive (unshared) use of the data set.

If you specify DISP=OLD for an output tape data set and (1) the data set is not protected by RACF® or a password or (2) the data set has no expiration date, the system does not verify the data set name in the header label.

SHR
Indicates that the data set exists before this step and that other jobs can share it, that is, use it at the same time. This subparameter can also be coded as SHARE.

If you specify DISP=SHR for an output tape data set and (1) the data set is not protected by RACF or a password or (2) the data set has no expiration date, the system does not verify the data set name in the header label.

MOD
Indicates one of the following:
  • The data set exists and records are to be added to the end of it. The data set must be sequential.
  • A new data set is to be created.

In either case, MOD specifies exclusive (unshared) use of the data set.

When the data set is opened, the read/write mechanism is positioned after the last sequential record for an existing data set or at the beginning for a new data set. For subsequent OPENs within the same step, the read/write mechanism is positioned after the last sequential record.

Note: You cannot specify DISP=MOD to extend an ISO/ANSI/FIPS Version 3 tape data set unless the ISO/ANSI/FIPS Version 3 label validation installation exit allows the extension. For information on using ISO/ANSI/FIPS Version 3 installation exits, see z/OS DFSMS Using Magnetic Tapes.

If the system cannot find volume information for the data set on the DD statement, in the catalog, or passed with the data set from a previous step, the system assumes that the data set is being created in this job step. For a new data set, MOD causes the read/write mechanism to be positioned at the beginning of the data set.

To use DISP=MOD to create a new data set, code one of the following:
  • No VOLUME=SER or VOLUME=REF parameter on the DD statement. The data set must not be cataloged or passed from another job step.
  • A VOLUME=REF parameter that refers to a DD statement that makes a nonspecific volume request. (A nonspecific volume request is a DD statement for a new data set that can be assigned to any volume or volumes.) If it is tape, the referenced DD must not be opened before the DD with VOL=REF. If it is opened later, it will get a different tape volume. If it is tape and the referenced DD is in a different step it must not be opened before the DD with VOL=REF. If the referenced DD is for a nonspecific volume in the same step then the DD with VOL=REF will always be nonspecific regardless of the order of OPENs in the step. For DASD, one of the following must also be true:
    • The DSNAME parameters in the two DD statements must be different.
    • The two DD statements must request different areas of the same ISAM data set.
  • In the case of tape, if you do not specify an explicit volume serial number on the DD statement, then you cannot specify a file sequence number greater than 1 and the system requests the operator to mount a "scratch" tape.

    For a new generation of a generation data group (GDG) data set (where (+n) is greater than 0), you may code VOLUME=REF or VOLUME=SER.

    For an SMS-managed data set the system ignores the volume.

After the system chooses a volume for a new data set, if the system finds another data set with the same name on that volume, the system will try to allocate a different volume. However, SMS-managed data sets require unique data set names. If a new data set is chosen to be SMS-managed and an existing SMS-managed data set has the same name, the request fails.

In a JES3 system, if you code DISP=MOD for a multivolume data set and any of the volumes are JES3-managed, JES3 will not execute the job until all volumes, including scratch volumes being added, are allocated. Such a job will wait on the queue until all volumes are allocated.

To use DISP=MOD to extend an existing data set, code one of the following:
  • If the data set is cataloged, do not code a VOLUME=SER or a VOLUME=REF parameter on the DD statement, but code DISP=MOD or DISP=(MOD,KEEP) to make sure that the catalog will be updated with any new volume serial numbers.
  • If the data set did not exist at the beginning of the job, but was passed from a prior step and not cataloged, it will be deleted at step termination. However, if you want to keep the data set, you can code DISP=(MOD,KEEP).