JCLLIB Example


Scenario1 - Coding single procedure library.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y',NOTIFY=&SYSUID
//MYLIBS   JCLLIB  ORDER=MTH.PROCLIB
//STEP01   EXEC PROC=MTHPROC

Explaining Example -

The system searches for procedure MTHPROC in the following order -

  1. MTH.PROCLIB
  2. SYS1.PROCLIB

Scenario2 - Coding multiple procedure libraries.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y',NOTIFY=&SYSUID
//MYLIBS   JCLLIB ORDER=(MTH.PROCLIB1,MTH.PROCLIB2,
//              MTH.PROCLIB3)
//STEP01   EXEC PROC=MTHPROC

Explaining Example -

The system searches for procedure MTHPROC in the following order -

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