JCL Catalog Procedure's |
By using procedures/JCL catalog procedure, the amount of JCL coding you have to do is reduced, resulting in fewer coding errors and greater productivity.
Definition of cataloged procedure.
A cataloged procedure is a series of JCL statements that are stored in a partitioned data set and may be invoked by any job on the system.
Typical types of cataloged procedures
- IBM-supplied procedures that compile, link, and run programs
- JCL steps that back up, delete and define VSAM files
- Programs that are required by many jobs
- Large jobs where it makes sense to separate the steps into manageable procedures.
Cataloged procedures are stored in partitioned data sets and can be invoked by any job on the system. When you invoke a cataloged procedure, the system looks for it in the system procedure library, SYS1.PROCLIB, unless you specify otherwise.
The syntax for invoking a JCL procedure
EXEC [PROC=]procedure-name
Explanation
procedure-name | Identifies the procedure to be called and executed. For cataloged procedures, it’s the member name of the procedure. For in-stream procedures, it’s the name on the PROC statement that begins the procedure. |
Example:
A job that invokes a cataloged procedure
//STEP1 EXEC TMP3000
//
The cataloged JCL procedure named TMP3000 that is invoked
//TMP3010 EXEC PGM=EMP33010
//SYSOUT DD SYSOUT=*
//INVMAST DD DSNAME=RCA2.INVE.MASTER.FILE,DISP=SHR
//INVSEL DD DSNAME=&&INVSEL,DISP=(NEW,PASS),
// UNIT=SYSDA,SPACE=(CYL,(20,10))
//SELCTL DD DUMMY
//INV3020 EXEC PGM=EMP3020
//SYSOUT DD SYSOUT=*
//INVMAST DD DSNAME=&&INVSEL,DISP=(OLD,DELETE)
//INVSLST DD SYSOUT=*
No comments:
Post a Comment