Description of status

The process of securing control of data sets for a job is called data set integrity processing. Data set integrity processing avoids conflict between two or more jobs that request use of the same data set. For example, two jobs, one named READ and another named MODIFY, both request data set FILE.

If both jobs use FILE concurrently, READ cannot be certain of the integrity of FILE because MODIFY is changing records in the data set. MODIFY should have exclusive control of the data set.

Indicate the type of control needed by coding the data set's status:
   //ddname  DD  DISP=(NEW,...
   //ddname  DD  DISP=(OLD,...
   //ddname  DD  DISP=(MOD,...
   //ddname  DD  DISP=(SHR,...  
For exclusive use of a data set, code:
For shared use of a data set, code:

Exclusive control of a data set

When a job has exclusive control of a data set, no other job can use that data set until completion of the last step in the job that refers to the data set except when downgrading ENQs. A job should have exclusive control of a data set in order to modify, add, or delete records.

In some cases, you may not need exclusive control of the entire data set. You can request exclusive control of a block of records by coding the DCB, READ, WRITE, and RELEX macro instructions. See z/OS DFSMS Using Data Sets .

Shared control of a data set

Several jobs can concurrently use a data set on a direct access device if they request shared control of the data set. None of the jobs should change the data set in any way.

If more than one step requests a shared data set, code SHR on every DD statement that requests the data set, if it is to be used by concurrently executing jobs.

Examples

   //DD1   DD  DSNAME=PERMDS,DISP=OLD
   //DD2   DD  DSNAME=&&TEMPDS,DISP=NEW
   //DD3   DD  DSNAME=GENDS(+1),DISP=(NEW,CATLG)