Modifying nested procedures

The rules for modifying OUTPUT JCL and DD statements described in Modifying OUTPUT JCL and DD statements apply to nested procedures.

In addition, the following rules apply to modifying statements in nested procedures.
  1. Procedure and step names referenced by other statements in the job should be unique within the job.
  2. Modifying or additional JCL statements must appear in the job stream following the EXEC statement for the procedure they are to modify and prior to the next EXEC statement.
  3. Modifying or additional JCL statements apply to one level of nesting only. You can use statements to modify statements in a procedure only for the level of nesting at which the EXEC statement for that procedure appears.
  4. Modifying or additional JCL statements cannot themselves be modified. Do not modify statements that are overrides or additions to a procedure.
  5. Modifying or additional JCL statements can only have procstepname.name or procstepname.ddname in their name field. Do not specify backward references to nested procedures, such as procstepname.procstepname.ddname DD parameters.

These rules are illustrated in the examples in this topic.