TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

JCL - In-Stream Procedure


Let's see an example to understand In-Stream procedure,

Example 1:

//TESTJCL1 JOB 100,CLASS=C,MSGCLASS=Y,NOTIFY=&SYSUID
//*
//INSMPROC   PROC                   //*START OF PROCEDURE
//PROC1		EXEC PGM=SORT
//SORTIN	DD DSN=HLQ.FILE.INPUT,DISP=SHR
//SORTOUT	DD DSN=HLQ.FILE.OUTPUT,DISP=SHR
//SYSOUT	DD SYSOUT=*
//SYSIN		DD DSN=HLQ.APP.CARDLIB(SORTCARD),DISP=SHR
//           PEND                   //*END OF PROCEDURE
//*
//STEP1      EXEC INSMPROC
//*
//STEP2      EXEC INSMPROC

Explanation:

In the above example, the procedure INSMPROC is called in STEP1 and STEP2.

As discussed in previous chapter, An in-stream procedure INSMPROC coded begin with a PROC statement, end with a PEND statement.

Also, If the called procedure is an in-stream procedure, the system retrieves it from the job input stream. You must place the in-stream procedure before the EXEC statement that calls it.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal