A procedure name in JCL is used on the EXEC statement to identify a cataloged or in-stream procedure to be executed. This allows reuse of predefined sequences of JCL statements, reducing redundancy and improving standardization.
1//stepname EXEC procname[,parameter-overrides]
1//STEP1 EXEC PAYROLL
Executes the cataloged procedure named PAYROLL
123//STEP2 EXEC COBOL, // REGION=4M, // PARM.COB='NOMAP,NOSEQ'
Executes the COBOL procedure with overrides for REGION and the PARM parameter on step COB
12//STEP3 EXEC SORT, // DATE=&SYSDATE
Executes the SORT procedure, passing the current system date to the DATE symbolic parameter
12345//MYPROC PROC //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=MY.DATASET,DISP=SHR // PEND //RUNPROC EXEC MYPROC
Defines an in-stream procedure MYPROC and then executes it
Cataloged procedures are typically stored in procedure libraries defined by the installation:
You can override parameters and DD statements within procedures:
parameter=value
parameter.procstep=value
//stepname.procstep.ddname DD ...
//stepname.ddname DD ...