All programs to be executed must reside in a library, which is
a partitioned data set (PDS) or partitioned data set extended (PDSE).
The installation should maintain a list of programs available in
its libraries. Libraries are of three types:
- System libraries: such as SYS1.LINKLIB
- Private libraries: specified in a JOBLIB or STEPLIB DD statement
- Temporary libraries: created in a previous step of the job.
For information about libraries, see Resource control of program library.
Execute a program in a system or private library by coding:
//stepname EXEC PGM=program-name
Execute a program in a temporary library by coding:
//stepname EXEC PGM=*.stepname.ddname
//stepname EXEC PGM=*.stepname.procstepname.ddname
Examples:
//ST1 EXEC PGM=MYPROG
//DSPROG DD DSNAME=PDS1(MEMP),DISP=SHR
//ST2 EXEC PGM=*.ST1.DSPROG