Examples of the STEPLIB DD statement
//PAYROLL JOB BROWN,MSGLEVEL=1
//STEP1 EXEC PROC=LAB14
//STEP2 EXEC PGM=SPKCH
//STEPLIB DD DSNAME=PRIV.LIB5,DISP=(OLD,KEEP)
//STEP3 EXEC PGM=TIL80
//STEPLIB DD DSNAME=PRIV.LIB12,DISP=(OLD,KEEP)
The system searches PRIV.LIB5 for the program SPKCH and PRIV.LIB12 for TIL80. The system catalogs both private libraries.
//PAYROLL JOB BAKER,MSGLEVEL=1
//JOBLIB DD DSNAME=LIB5.GROUP4,DISP=(OLD,PASS)
//STEP1 EXEC PGM=SNZ12
//STEP2 EXEC PGM=SNAP10
//STEPLIB DD DSNAME=LIBRARYP,DISP=(OLD,PASS),
// UNIT=3390,VOLUME=SER=55566
//STEP3 EXEC PGM=A1530
//STEP4 EXEC PGM=SNAP11
//STEPLIB DD DSNAME=*.STEP2.STEPLIB,
// DISP=(OLD,KEEP)
The system searches LIBRARYP for program SNAP10; LIBRARYP is passed to subsequent steps of this job. The STEPLIB DD statement in STEP4 refers to the LIBRARYP library defined in STEP2; the system searches LIBRARYP for SNAP11. Since a JOBLIB DD statement is included, the system searches for programs SNZ12 and A1530 first in LIB5.GROUP4, then in SYS1.LINKLIB.
//PAYROLL JOB THORNTON,MSGLEVEL=1
//JOBLIB DD DSNAME=LIB5.GROUP4,DISP=(OLD,PASS)
//STEP1 EXEC PGM=SUM
//STEPLIB DD DSNAME=SYS1.LINKLIB,DISP=OLD
//STEP2 EXEC PGM=VARY
//STEP3 EXEC PGM=CALC
//STEPLIB DD DSNAME=PRIV.WORK,DISP=(OLD,PASS)
// DD DSNAME=LIBRARYA,DISP=(OLD,KEEP),
// UNIT=3390,VOLUME=SER=44455
// DD DSNAME=LIB.DEPT88,DISP=(OLD,KEEP)
//STEP4 EXEC PGM=SHORE
For STEP2 and STEP4, the system searches the private library named LIB5.GROUP4 defined in the JOBLIB DD statement first for programs VARY and SHORE. For STEP1, the system searches SYS1.LINKLIB first for program SUM, because the STEPLIB DD statement names the system library.
A concatenation of private libraries is defined in STEP3. The system searches for the program named CALC in this order: PRIV.WORK, LIBRARYA, LIB.DEPT88, SYS1.LINKLIB. If a later job step refers to the STEPLIB DD statement in STEP3, the system will search for the program in the private library named PRIV.WORK and, if it is not found there, in SYS1.LINKLIB; the concatenated libraries are not searched.