TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

JCL - System/User Defined Libraries

System Libraries:

z/OS has many standard system libraries. We listed few of them, that you will come across often.

SYS1.PROCLIB This library contains JCL procedures distributed with z/OS. In practice, there are many other JCL procedure libraries (supplied with various program products) concatenated with it.

SYS1.PARMLIB This library contains control parameters for z/OS and for some program products. In practice, there may be other libraries concatenated with it.

SYS1.LINKLIB This library contains many of the basic execution modules of the system. In practice, it is one of a large number of execution libraries that are concatenated.

SYS1.LPALIB This library contains system execution modules that are loaded into the link pack area when the system is initialized. There may be several other libraries concatenated with it. Programs stored here are available to other address spaces.

SYS1.NUCLEUS This library contains the basic supervisor ("kernel") modules of z/OS.

SYS1.SVCLIB This library contains operating system routines known as supervisor calls (SVCs).

User Defined Libraries:

Let us see user defined/private libraries, which we use more often in JCL,


To successfully run the program that you specify on a JCL EXEC statement, z/OS has to search for and find that program. Using JOBLIB or STEPLIB DD statements can reduce search time.

When you code the PGM parameter, z/OS looks for a program, and will automatically search standard system program libraries, such as SYS1.LINKLIB, which contains IBM-supplied programs.

If the program you want to run resides in a private program library, you must specify either a JOBLIB DD statement or a STEPLIB DD statement for z/OS to successfully locate the program.

Although both the JOBLIB DD statement and the STEPLIB DD statement identify one or more private libraries as the location of a specified program, they dictate different search behaviors for z/OS.

JOBLIB tells z/OS to search the private libraries for each step in the job.

STEPLIB tells z/OS to search the private libraries only for one step.

In both cases, z/OS searches system libraries only if it does not find the program first in the private libraries on the JOBLIB or STEPLIB DD statement.

To decide which DD statement is most efficient for you to use, you need to know the location of the programs to be run. If most are in the same private library, for example, the JOBLIB DD statement is probably the best choice. If only a few programs are in private libraries, the STEPLIB DD statement is probably the most efficient.

In this example, a JOBLIB DD statement names the private library in which PROGRAMA resides:


In this example, a STEPLIB DD statement names the private library in which PROGRAMA resides:


If you code both a JOBLIB DD and STEPLIB DD statement in the same job, the STEPLIB DD statement overrides the JOBLIB statement only for the one step.

For that step only, the system ignores JOBLIB and first searches the private libraries specified on the STEPLIB DD statement.

If the system does not find the program in the private libraries, it then searches the system libraries. Then, if z/OS still has not found the program, the system abnormally ends the job step.

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal