---
title: "Internal Reader – COBOL and JCL"
description: "JCL internal reader is a dual mode intermediate facility to receive data from either JCL or from COBOL module. If the data in internal reader has JCL statements it submits job to the spool for processing. Read more."
url: https://srinimf.com/2014/06/16/internal-reader-cobol-and-jcl/
date: 2014-06-16
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2014/06/pexels-photo-618079.jpeg?fit=1880%2C1058&ssl=1
categories: ["COBOL", "JCL"]
tags: ["Internal reader JCL", "JCL tips and Tricks"]
type: post
lang: en
---

# Internal Reader – COBOL and JCL

What is an internal reader? The 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](https://srinimf.com/2017/07/09/these-three-commands-need-to-submit-jcl-from-cics/) give the 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 can be ‘A or B or C etc.

When the Spool fulls and encounters the last statement /*EOF, the statements in the internal reader will be processed.

If JCL statements are there in the Internal reader, then, JOB will be submitted.

**Some of the end statements:**

**/*EOF**
This control statement delimits the job in the data set and makes it eligible for immediate processing.

**/*DEL**
This control statement cancels the job in the data set and schedules it for immediate output processing. The output consists of any [JCL submitted](https://srinimf.com/2015/03/04/jcl-my-job-submitted-but-not-running/), followed by a message indicating that the job was deleted before execution.

Related[Start the Job, Stop the Job and Cancel the Job-JCL](https://srinimf.com/2016/06/10/start-the-job-stop-the-job-and-cancel-the-job-jcl/)

**/*PURGE**
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.

**/*SCAN**
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 the COBOL module. See the flow chart given below

[![Internal reader](https://i0.wp.com/srinimf.com/wp-content/uploads/2014/06/internal-reader.png?resize=502%2C436&ssl=1)](https://i0.wp.com/srinimf.com/wp-content/uploads/2014/06/internal-reader.png?ssl=1)

**Application of internal reader [sample JCL](https://srinimf.com/2011/04/11/ims-test-jcl-sample/)**

> In this JCL, [job card](https://srinimf.com/2014/07/23/jcl-mandatory-details-in-job/)s 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=* iscoded.
- The **/*EOF** statement specifies that the preceding jobs are to be sentimmediately 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=*
//
```

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2014%2F06%2F16%2Finternal-reader-cobol-and-jcl%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2014%2F06%2Fpexels-photo-618079.jpeg%3Ffit%3D1200%252C675%26ssl%3D1&description=Internal%20Reader%20-%20COBOL%20and%20JCL)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2014/06/16/internal-reader-cobol-and-jcl/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2014/06/16/internal-reader-cobol-and-jcl/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2014/06/16/internal-reader-cobol-and-jcl/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2014/06/16/internal-reader-cobol-and-jcl/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Internal%20Reader%20-%20COBOL%20and%20JCL&body=https%3A%2F%2Fsrinimf.com%2F2014%2F06%2F16%2Finternal-reader-cobol-and-jcl%2F&share=email)
-

### Like this:

Like Loading…
