PGM Parameter Example


Scenario1 - Executing a program.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y', MSGLEVEL=(1,1)
//STEP1   EXEC PGM=SAMPLE
//STEPLIB  DD  DSN=MTH.MY.LOADLIB,DISP=SHR

Explaining Example -

The system searches the private library MTH.MY.LOADLIB for the member named PROG1. The system reads the member into storage and executes it.

Scenario2 -

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP2 JOB (META007),'PAWAN Y',CLASS=A
//...
//...
//LINKEDIT EXEC PGM=IEWL
//SYSLMOD  DD   DSN=&&MTHDS(PROG1),
//	            UNIT=3390,DISP=(MOD,PASS),
//              SPACE=(100,(50,20))
//EXECPROG EXEC PGM=*.LINKEDIT.SYSLMOD

Explaining Example -

The EXECPROG EXEC statement contains a backward reference to DD statement SYSLMOD in the LINKEDIT step. Program PROG1 is a member of the temporary PDS &&MTHDS. Step EXECPROG executes program PROG1.