z/OS MVS JCL User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Cataloged procedures

z/OS MVS JCL User's Guide
SA23-1386-00

A cataloged procedure, like an in-stream procedure, is a named set of job control statements. However, these control statements are placed, or cataloged, in a partitioned data set (PDS) or partitioned data set extended (PDSE) known as a procedure library. This enables a cataloged procedure to be invoked by any job.

Cataloged procedures can be placed in the system procedure library SYS1.PROCLIB or in any user-specified procedure library (for example JCLLIB). For additional information on procedure libraries, refer to z/OS MVS JCL Reference.

Table 1 shows an example of a cataloged procedure named MYPROC. Table 2 shows an example of a job that executes MYPROC.

Table 1. Cataloged Procedure: Member MYPROC in SYS1.PROCLIB
Job control statement Explanation
//MYPROC PROC Starts cataloged procedure
//MY1 EXEC PGM=WORK1 Identifies first step in procedure

//MYDDA DD    SYSOUT=A
//MYDDB DD    SYSOUT=*

Request 2 data sets for first procedure step
//MY2 EXEC PGM=TEXT5 Identifies second step in procedure

//MYDDC DD    DSNAME=F.G.H,DISP=OLD
//MYDDE DD    SYSOUT=*

Request 2 data sets for second procedure step
// PEND Indicate end of procedure.
Table 2. Job that Executes Cataloged Procedure MYPROC
Job control statement Explanation
//JOB2 JOB ,'JACKIE DIGIAN' Starts job
//STEPA EXEC PROC=MYPROC First step in JOB2, executes procedure
//MY2.MYDDC DD DISP=(OLD,DELETE) Modifies DD statement MYDDC in procedure step MY2
Note: Before cataloging any procedure, test it as an instream procedure first.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014