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


Parameters on JOBLIB DD statements

z/OS MVS JCL Reference
SA23-1385-00

When retrieving a cataloged library:
  • Code the DSNAME parameter.
  • Code the DISP parameter. The status subparameter must be OLD or SHR. The disposition subparameters should indicate what you want done with the private library after its use in the job.
  • Do not code VOLUME or UNIT.
When retrieving a library that is not cataloged:
  • Code the DSNAME parameter.
  • Code the DISP parameter. The DISP parameter must be DISP=(OLD,PASS) or DISP=(SHR,PASS). SHR indicates that the data set is old, but allows other jobs to use the library.
  • Code the UNIT parameter.
  • Code the VOLUME parameter.
When creating a library:
  • Code the DSNAME parameter to assign the library a name.
  • Code the UNIT parameter. The library must be allocated to a direct access device.
  • Code a VOLUME parameter, unless a nonspecific request is to be made for any volume.
  • Code the SPACE parameter, allowing enough space for the entire library on one direct access volume. Specify space for the PDS directory.
  • Code a DISP parameter. The status is NEW. Code CATLG as the disposition, if you intend to keep the library you are creating. Code PASS as the disposition, if you wish the library to be available throughout the job, but deleted at job termination. Note that you must code a disposition; otherwise, the system assumes DELETE and deletes the library at the end of the first step.
Note: Do not use VSAM for a JOBLIB library.
When adding members to the library:
  • In the DSNAME parameter, follow the library name with the name of the program being added to the library. For example, DSNAME=LIBRARY(PROGRAM).
  • Code the status in the DISP parameter as MOD. If you cataloged the library when you created it, do not code a disposition. Otherwise, code PASS or CATLG.
  • If the JOBLIB library is being created in the job, the JOBLIB DD DISP specified CATLG, and the first step adds a member to it, supply unit and volume information in the first step by coding: VOLUME=REF=*.JOBLIB. This parameter is needed because the library is not actually cataloged until the first step completes execution. Otherwise, unit and volume information should not be supplied for a cataloged library.
  • Do not code a SPACE parameter. The JOBLIB DD statement requests space for the entire library.

Other parameters: Code the DCB parameter if complete data control block information is not contained in the data set label. Do not specify FREE=CLOSE; CLOSE is ignored.

Do not code a UNIT=AFF parameter on a JOBLIB statement where the object of the affinity is the same JOBLIB statement. In other words, a JOBLIB statement should not have an affinity back to itself.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014