Overriding and adding DD statements

You can override or add a DD statement by specifying a DD statement whose name is composed of the ddname of the DD statement being overridden, preceded by the procedure stepname that qualifies that ddname:
//procstep.ddname  DD      (appropriate parms)
You must observe the following when overriding or adding a DD statement within a step in a procedure:
  • Overriding DD statements must be in the same order in the input stream as they are in the cataloged procedure.
  • DD statements to be added must follow overriding DD statements.
Additionally, you should be aware of the following when overriding a DD statement:
  • To nullify a keyword parameter (except the DCB and AMP parameters), write the keyword and an equal sign followed by a comma in the overriding DD statement. For example, to nullify the use of the UNIT parameter, specify UNIT=, in the overriding DD statement.
  • You can nullify a parameter by specifying a mutually exclusive parameter. For example, you can nullify the SPACE parameter by specifying the mutually exclusive SPLIT parameter in the overriding DD statement.
  • There is no order of precedence for the parameters. Their placement (order of execution) does not matter.
  • To override DD statements in a concatenation of data sets, you must provide one DD statement for each data set in the concatenation. Only the first DD statement in the concatenation should be named. If the DD statement you want to change or add follows one or more DD statements that will be unchanged, code one DD statement with blank operand for each unchanged DD statement ahead of the first DD statement that you want to change or add.
    For example, to add your load module data set, MY.LIB, to the runtime STEPLIB in a Language Environment cataloged procedure containing one data set whose DD statement you do not want to change, code:
    //GO.STEPLIB DD
    //           DD DSN=MY.LIB,DISP=SHR
    This causes your load module data set to be searched after the data set named in the STEPLIB DD statement in the cataloged procedure.
    To have another data set searched before any data sets already in the cataloged procedure, you must specify all the data sets in your overriding DD statements. For example, to have CEE.SIBMMATH searched before CEE.SCEELKED (assuming it is a non-XPLINK application), code:
    //LKED.SYSLIB DD DSN=CEE.SIBMMATH,DISP=SHR
    //            DD DSN=CEE.SCEELKED,DISP=SHR
    This causes the PL/I versions of the math routines to be link-edited into your load module rather than the identically named SCEELKED math routines.
  • If the DDNAME=ddname parameter is specified in a cataloged procedure, it cannot be overridden; rather, it can refer to a DD statement supplied at the time of execution.
The example in Figure 1 shows how to override parameters in a cataloged procedure by:
  • Changing the library prefix for the SCEELKED link library to SYS1
  • Increasing the region for linking and running the application
  • Passing the RPTSTG and RPTOPTS options to the load module when it is executed in the GO step of the procedure
  • Specifying PROGRAM1 in USER.OBJLIB as the input object module to the binder
Figure 1. Overriding parameters in the CEEWLG cataloged procedure
//CEEWLG   JOB
//*
//LINKGO EXEC CEEWLG,
//  LIBPRFX='SYS1',
//  REGION=2048K,
//  PARM.GO='RPTSTG(ON) RPTOPTS(ON)/'
//*
//LKED.SYSIN   DD DSN=USER.OBJLIB(PROGRAM1),DISP=SHR
//*