Batch Execution Order STEPLIB, JOBLIB, LINKLIB, SYSLIB
book
Article ID: 187082
calendar_today
Updated On:
Products
GenGen - Workstation ToolsetGen - Host EncyclopediaGen - Run Time Distributed
Issue/Introduction
This is an internal doc with an explanation on execution order for z/OS batch programs.
Environment
Release : 8.6
Component : CA Gen Host Encyclopedia
Resolution
Libraries can define in a DD statement in the following ways:
With the ddname STEPLIB at any point in the job step. The STEPLIB is searched before any system library or JOBLIB specified in a JOBLIB DD statement for the job step in which it appears (although an executable program can also be passed to subsequent job steps in the usual way). When a STEPLIB and JOBLIB are both present, the STEPLIB is searched for the step in which it appears and, for that step, the JOBLIB is ignored.
The system searches for executable programs in the following order of precedence:
Library specified in STEPLIB statement
Library specified in JOBLIB statement
LPA or ELPA
The system library SYS1.LINKLIB and libraries concatenated to it through the active LNKLSTxx member of SYS1.PARMLIB
In the following example, the system searches USER.LOADLIB for the routine PROGRAM1 and USER.LOADLIB2 for the routine PROGRAMA:
With the ddname JOBLIB immediately after the JOB statement in your JCL. This library is searched before the system libraries. If any executable program is not found in the JOBLIB, the system looks for it in the system libraries.
In the following example, the system searches the private library USER.LOADLIB for the member PROGRAM1, reads the member into storage, and executes it.