READERS (JES input readers) bring jobs into the mainframe system. The internal reader (INTRDR) is a special destination that lets programs submit JCL dynamically. This is how one job can generate and submit another job.
Imagine a mailbox (reader) where you drop letters (JCL). The internal reader is like a mail chute inside the building—your program drops a letter and the post office (JES) picks it up immediately.
One pattern is to OPEN a file routed to the internal reader and WRITE each line of the JCL. Your program then closes the file; JES ingests the job.
123//SUBMIT JOB ACCT,'SUBMIT VIA INTRDR' //STEP1 EXEC PGM=MYCOBOL //INTRDR DD SYSOUT=(A,INTRDR)
The DD routes output lines to the internal reader. The COBOL program writes JCL lines to DD INTRDR.
123456789101112131415161718IDENTIFICATION DIVISION. PROGRAM-ID. SUBMITTER. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT JCL-OUT ASSIGN TO INTRDR. DATA DIVISION. FILE SECTION. FD JCL-OUT RECORD CONTAINS 80 CHARACTERS. 01 JCL-LINE PIC X(80). PROCEDURE DIVISION. OPEN OUTPUT JCL-OUT MOVE '//JOB1 JOB (ACCT),CLASS=A,MSGCLASS=X' TO JCL-LINE WRITE JCL-LINE MOVE '//STEP1 EXEC PGM=IEFBR14' TO JCL-LINE WRITE JCL-LINE CLOSE JCL-OUT STOP RUN.
Site-specific assignments may differ. Coordinate with system programming for required DD setup and authorities.
Mistake | Problem | Fix |
---|---|---|
Missing authority | Security violation or job rejected | Request access to INTRDR, follow standards |
Malformed JCL | Job abends or stays in input error queue | Validate before submit; include test path |
Submitting too many jobs | Queue congestion and WLM issues | Throttle submissions; use proper classes |
Concept | Definition | Example |
---|---|---|
Reader | JES component that ingests jobs | Terminal/RJE/INTRDR |
INTRDR | Internal reader destination | SYSOUT=(A,INTRDR) |
Program submission | Write JCL lines to INTRDR | OPEN OUTPUT, WRITE records |
1. What is a JES input reader?
2. What is the internal reader (INTRDR)?
3. How can a COBOL program submit a job?
4. Why use the internal reader?
5. Is READERS a COBOL verb?