Instream procedures
• Completely contained within a JCL JOB
• String of JCL statements appearing between a proc and pend statement within a JOB
• Available to only one JOB
• Upto 15 procedures can be defined within a JOB
• Within a JOB, can be invoked any number of times
Cataloged Procedures
• A procedure that you catalog in a library is called a cataloged procedure
• A cataloged procedure may consist of these JCL statements: CNTL, command, DD, ENDCNTL, EXEC, IF/THEN/ELSE/ENDIF, INCLUDE, OUTPUT JCL, and SET. Optionally, a cataloged procedure can begin with a PROC statement and end with a PEND statement. If coded, PROC must be the first statement in the procedure
Symbolic parameters
• A symbolic parameter is a symbol preceded by an ampersand that stands for a parameter, sub parameter or value
• Use it for values that can change with each execution of the procedure
• Makes the procedure more flexible and general purpose
• Can be 1-7 characters, alphanumeric or national, preceded by and a keyword parameter that can be coded on the EXEC statement like time, cond, parm cannot be a symbolic parameter
• Default values can be specified for a symbolic parameter in the operand field of the proc statement
Overriding parameters
• To override a parameter on the EXEC statement, when invoking the proc, follow on the proc statement with: PARAMETER.PROC STEPNAME=VALUE
Overriding DD statements
• Recode the DD statement with the DD name proc stepname. DD name
• No need to recode the entire DD statement. Just code the changes.
• If overriding more than one DD statement, put the overriding statements in the same order as they appear in the procedure
• To add new DD statements, put them after all the overriding statements
