Here are prime ideas on overriding cataloged procedure values in the mainstream JCL.
- Instream procedures are identical to cataloged procedures except that you place them right along with the job in the input stream, immediately following the JOB statement, rather than as members of partitioned data sets.
- You might use instream procedures to test JCL before placing it in a cataloged procedure. You might also use them as your own procedure library without the bother of placing them in a partitioned data set.
2. How Many Ways We Can Override Procs
- You can change procedures in two ways: by overriding them (EXEC, DD, and OUTPUT statements only) or by assigning values to symbolic parameters on either the EXEC or SET statement.
- For example, a procedure to copy a disk dataset onto tape might use a symbolic parameter for the disk data set name and the tape volume serial number. These values would likely change each time you invoke the procedure, and it would be nice to make it easy to change the JCL.
- Symbolic parameters do this. You give a value a symbolic name, you can set default values within the procedure, and you can supply a different value when you code the EXEC statement invoking the procedure.
- Symbolic parameters provide a means of generalizing JCL; another reason for creating procedures. The INCLUDE statement provides further generality when placed in a cataloged procedure by naming a member of a partitioned data set containing statements to copy in where the INCLUDE statement is placed.
Statements That are Allowed in Procedures
- EXEC statement
- IF/THEN/ELSE/ENDIF statement construct
- DD statement. (But not DD * or DD DATA)
- OUTPUT statement
- SET statement
- INCLUDE statement
- Comments statements (//*)