An in-stream procedure is a named set of job control statements in a job that can be re-executed within that job, simply by invoking the name of the procedure. This enables you to execute the set of control statements more than one time in the same job without having to repeat the statements.
Table 1 shows a job that contains an in-stream procedure. Its name is PTEST, and it ends with a PEND statement.
Job control statement | Explanation |
---|---|
//JOB1 JOB CT1492,'JIM MOSER' | Starts job |
//PTEST PROC | Starts in-stream procedure |
//PSTA EXEC PGM=CALC | Identifies first step in procedure |
|
Request 3 data sets for first procedure step |
//PSTB EXEC PGM=PRNT | Identifies second step in procedure |
|
Request 2 data sets for second procedure step |
// PEND | Ends in-stream procedure |
//STEP1 EXEC PROC=PTEST | First step in JOB1, executes procedure |
|
Adds in-stream data to procedure step |