PROCLIB Example


Scenario1 - Coding MTH.PROCLIB as proc library.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y',NOTIFY=&SYSUID
//PROCLIB DD DSN=MTH.PROCLIB,DISP=SHR
//STEP01 EXEC MTHPROC

Explaining Example -

The system searches the libraries for procedure MTHPROC in the following order -

  1. MTH.PROCLIB
  2. SYS1.PROCLIB

Scenario2 - Coding MTH.PROCLIB, MTH.PROCLIB1 and MTH.PROCLIB2 as proc library.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y',NOTIFY=&SYSUID
//PROCLIB DD DSN=MTH.PROCLIB,DISP=SHR
//        DD DSN=MTH.PROCLIB1,DISP=SHR
//        DD DSN=MTH.PROCLIB2,DISP=SHR
//STEP01 EXEC MTHPROC

Explaining Example -

The system searches the libraries for procedure MTHPROC in the following order -

  1. MTH.PROCLIB
  2. MTH.PROCLIB1
  3. MTH.PROCLIB2
  4. SYS1.PROCLIB