Previous Topic: Writing to a PrinterNext Topic: Modifying a Task's Priority


Writing JCL to a JES2 Internal Reader

You can write JCL to a JES2 internal reader from a DC application program by issuing a WRITE PRINTER statement that specifies the CLASS parameter.

System Prerequisites

For your program to write JCL to a JES2 internal reader, the system administrator must first take these steps:

  1. Define in system generation a SYSOUT line, physical terminal, and logical terminal, using these guidelines:
    ADD LINE physical-line TYPE IS SYSOUTL DDNAME IS ddname.
    ADD PTERM physical-terminal TYPE IS SYSOUTT PRINTER CLASS IS 0
        PAGE WIDTH IS 80.
    ADD LTERM logical-terminal PRINTER CLASS = ADD (nn)
    

    In the LTERM statement, nn is any valid DC printer class. This class should be reserved for JES2 internal readers only.

  2. Include a DD card in the DC run JCL that links dd-name to a JES2 internal reader, using this format:
    //ddname  DD SYSOUT=(A,INTRDR),DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
    

What the Program Does

The DC application program can write JCL to the JES2 internal reader by using this command:

WRITE PRINTER FROM JCL-STATEMENT-AREA LENGTH 80 CLASS nn.
After the last JCL statement is written, you use the same command to write one additional line consisting of: /*EOF with 75 trailing blanks.