z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Examples of the JOBLIB DD statement

z/OS MVS JCL Reference
SA23-1385-00

Example 1:
//PAYROLL JOB  JONES,CLASS=C
//JOBLIB  DD   DSNAME=PRIVATE.LIB4,DISP=(OLD,PASS)
//STEP1   EXEC PGM=SCAN
//STEP2   EXEC PGM=UPDATE
//DD1     DD   DSNAME=*.JOBLIB,DISP=(OLD,PASS)

The private library requested on the JOBLIB DD statement is cataloged. The system passes catalog information to subsequent job steps. The system searches for the programs SCAN and UPDATE first in PRIVATE.LIB4, then in SYS1.LINKLIB. DD statement DD1 refers to the private library requested in the JOBLIB DD statement.

Example 2:
//PAYROLL JOB  FOWLER,CLASS=L
//JOBLIB  DD   DSNAME=PRIV.DEPT58,DISP=(OLD,PASS),
//           UNIT=3390,VOLUME=SER=D58PVL
//STEP    EXEC PGM=DAY
//STEP2   EXEC PGM=BENEFITS
//DD1     DD   DSNAME=*.JOBLIB,VOLUME=REF=*.JOBLIB,DISP=(OLD,PASS)

The private library requested on the JOBLIB DD statement is not cataloged; therefore, unit and volume information is specified. The system searches for the programs DAY and BENEFITS first in PRIV.DEPT58, then in SYS1.LINKLIB. DD statement DD1 refers to the private library requested in the JOBLIB DD statement.

Example 3:
//TYPE   JOB  MSGLEVEL=(1,1)
//JOBLIB DD   DSNAME=GROUP8.LEVEL5,DISP=(NEW,CATLG),
//          UNIT=3390,VOLUME=SER=148562,SPACE=(CYL,(50,3,4))
//STEP1  EXEC PGM=DISC
//DDA    DD   DSNAME=GROUP8.LEVEL5(RATE),DISP=MOD,
//          VOLUME=REF=*.JOBLIB
//STEP2  EXEC PGM=RATE

The private library requested on the JOBLIB DD statement does not exist yet; therefore, the JOBLIB DD statement contains all the parameters required to define the library. The library is created in STEP1, when DD statement DDA defines the new member RATE for the library. Therefore, the system searches SYS1.LINKLIB for the program named DISC. In STEP2, the system searches for the program RATE first in GROUP8.LEVEL5.

Example 4:
//PAYROLL JOB  BIRDSALL,TIME=1440
//JOBLIB  DD   DSNAME=KRG.LIB12,DISP=(OLD,PASS)
//        DD   DSNAME=GROUP31.TEST,DISP=(OLD,PASS)
//        DD   DSNAME=PGMSLIB,UNIT=3390,
//           DISP=(OLD,PASS),VOLUME=SER=34568
The three DD statements concatenate the three private libraries. The system searches the libraries for each program in this order:
  • KRG.LIB12
  • GROUP31.TEST
  • PGMSLIB
  • SYS1.LINKLIB

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014