What is an internal reader. INTRDR is an IBM-reserved name identifying the internal reader. The system places the output records for the internal reader into a buffer in your address space. When this buffer is full, JES places the contents on the spool. Later, JES retrieves the new job from the spool.
How to give internal reader in JCL…
//ddname DD SYSOUT=(class,INTRDR)
The data which is coming from COBOL is written to the spool in the ‘class” as we specified. The class an be ‘A or B or C etc’.
When spool fulls, and encounters last statement /*EOF, the statements in internal reader will be processed.
If JCL statements are there in Internal reader, then, JOB will be submitted.
Some of the end statements:
This control statement delimits the job in the data set and makes it eligible for immediate processing.
This control statement cancels the job in the data set and schedules it for immediate output processing. The output consists of any JCL submitted, followed by a message indicating that the job was deleted before execution.
For JES2 only, this control statement cancels the job in the data set and schedules it for purge processing; no output is produced for the job.
For JES2 only, this control statement requests that JES2 only scan the job in the data set for JCL errors. The job is not to be executed.
The internal reader will get input from either JCL or from COBOL module. See the flow chart given below
Application of internal reader sample JCL
In this JCL, job cards read from sysin card and writes into ineternal reader. When the last statement is /*EOF, it submits job to spool.
In the below JCL class is ‘M’
//SRINIMFA JOB D58JTH,HIGGIE //GENER EXEC PGM=IEBGENER //SYSIN DD DUMMY //SYSPRINT DD SYSOUT=A,DEST=NODE1 //SYSUT2 DD SYSOUT=(M,INTRDR) //SYSUT1 DD DATA //SRINIMFB JOB D58JTH,HIGGIE,MSGLEVEL=(1,1) //REPORTA EXEC PGM=SUMMARY //OUTDD1 DD SYSOUT=* //INPUT DD DSN=REPRTSUM,DISP=OLD //SRINIMFC JOB D58JTH,HIGGIE,MSGLEVEL=(1,1) //REPORTB EXEC PGM=SUMMARY //OUTDD2 DD SYSOUT=*,DEST=NODE2 //INPUT DD DSN=REPRTDAT,DISP=OLD /*EOF
The detailed explanation for the above sample internal reader JCL.
- SRINIMFA executes program IEBGENER.
- Program IEBGENER reads SRINIMFB and SRINIMFC from in-stream data set SYSUT1 and writes them to sysout data set SYSUT2, which is submitted to the internal reader.
- The message class for SRINIMFB and SRINIMFC is ‘M’, the SYSOUT class specified on DD statement SYSUT2.
- The message class for sysout data set OUTDD1 is ‘M’ because SYSOUT=* is
- The /*EOF statement specifies that the preceding jobs are to be sent
immediately to JES for input processing.
Sample JCL submit data from COBOL program to internal reader
//SUBMITS1 EXEC PGM=CBLINTR1 //STEPLIB DD DSN=SRINIMF.DEMO.LOADLIB1,DISP=SHR //JCLINPUT DD DSN=SRINIMF.PDS.JCL(UVBR00J1),DISP=SHR //SUBTORDR DD SYSOUT=(A,INTRDR) //SYSOUT DD SYSOUT=* //