PROCLIB
PROCLIB
PROCLIB is a system-level or user-defined library where commonly used procedures are stored. It is a collection of reusable procedures, also known as cataloged procedures, that can be called by multiple jobs.
PROCLIB should code before the first EXEC statement in the job.
Syntax -
//PROCLIB DD DSN=proclib-name... [comments]
Examples -
Scenario - Coding MTH.PROCLIB as proc library.
//MTHEXMP1 JOB (META007),'PAWAN Y',NOTIFY=&SYSUID
//PROCLIB DD DSN=MTH.PROCLIB,DISP=SHR
//STEP01 EXEC MTHPROC
The system searches the libraries for procedure MTHPROC in the following order -
- MTH.PROCLIB
- SYS1.PROCLIB