In-stream procedures

When you place a procedure in the job input stream, it is called an in-stream procedure.

An in-stream procedure must begin with a PROC statement, end with a PEND statement, and include only the following other JCL statements: CNTL, comment, DD, ENDCNTL, EXEC, IF/THEN/ELSE/ENDIF, INCLUDE, OUTPUT JCL, and SET. You must observe the following restrictions regarding in-stream procedures:
  • Do not place any JCL statements (other than the ones listed here) or any JES2 or JES3 control statements in the procedure.
  • Do not define one in-stream procedure within another, that is, do not use nested in-stream procedures. See Nested procedures for information on methods for nesting procedures.
  • Do not use an in-stream procedure if the procedure is run as a started job under the MASTER subsystem, that is, includes a JOB statement and is started using a START command such as S membername,SUB=MSTR.
  • When the converter processes an in-stream procedure, it creates a temporary data set with a system-generated name to hold the contents of the procedure. The jobname qualifier of this data set name is the name of the JES subsystem that is managing the job. See Data set name for temporary data set for a description of the format of system generated temporary data set names.