Module 4: JCL DD Statement
DD VOLUME Parameter
A reel of TAPE or a disk pack is called as on volume. VOL or VOLUME parameter is used to specify the volume serial number of the device on which a given data set is to be written or on which a data set currently resides.
Syntax:-
VOLUME= volumelabel/data-set label
Sub parameters used with VOLUME parameter:-
- SER=serial-num1,serial-num2 :- Identify by serial number of the volume(s) on which the dataset resides or will reside. It can have 1 through 6 alphanumeric or national characters. Maximum 255 volume serials can be coded
- REF :- Referencing VOL specification from previous steps
- PRIVATE :- As name suggests, it requests a volume in exclusive mode for the specified dataset. Only one job can use volume at a time. TAPES are private by default
- RETAIN :- Requests that volume should not be dismounted until end of job
- Volume SEQ Number :- Specification of sequencing in which volumes should be mounted
Example 1:-
//DEPTJOB JOB A123,’STEVE’
//STEP1 EXEC PGM=PROG1
//DDNAME1 DD DSN=TDATA1,
// VOLUME=SER=2345
In above example, DEPTJOB is submitted. PROG1 is executed, TDATA1 is accessed in a volume whose serial number is 2345
Example 2:-
//DEPTJOB2 JOB A123,’STEVE’
//STEP1 EXEC PGM=PROG2
//DDNAME2 DD DSN=TDATA2,
// VOLUME=SER=(VOL1,VOL2,VOL3)
In above example the data set called TDATA2 resides on 3 volumes whose serial number are VOL1, VOL2 and VOL3 respectively. The operating system will request that all volumes to be mounted at the same time