Module 4: JCL DD Statement
DD UNIT Parameter
It is used to specify the input/output device that is to be accessed. In mainframe, all devices have address assigned to them when they are added to the system. Thus, these devices can be accessed using the address. With use of UNIT parameter we can specify this address. Sometimes, certain types of device can be grouped together, and the group is given a name an din such case device can be referenced via group name
Syntax:-
UNIT= device-type | device-address | group-name | (device,,DEFER)
Example:-
//JOB1 JOB A123,’STEVE’
//STEP1 EXEC PGM=PROGRAM1
//DATA1 DD DSN=DEPT1.EMP1.DATA1,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA
//DATA2 DD DSN=DEPT1.EMP1.DATA2,
// DISP=(NEW,CATLG,DELETE),
// UNIT=3380
In above example, PROGRAM1 will be executed, and file ‘DATA1’ which resides on any of the devices which are grouped under the symbolic name SYSDA will be accessed and file ‘DATA2’ which resides on a 3380 disk unit will be accessed