Output Processing
This chapter describes the concept of output and output processing.
1. Overview
The SYSOUT data set is created during the job process and processed during the output step.
The SYSOUT data set is processed by the unit of what is called 'output.' Output processes include tasks of printing the contents of SYSOUT to a printer, submitting SYSOUT to a JOBQ through the internal reader, and processing SYSOUT by using a designated external writer.
The action to be taken is determined by the SYSOUT type as follows:
-
Printing from OpenFrame does not directly use a physical printer. Instead, the print data and resource information that are used in printing, such as FORMS, FORMDEF, or PAGEDEF, are delivered to an external print solution. To successfully deliver data, commands and common library paths must be defined to the VALUE of the COMMAND and DRIVER_PATH keys in the PRINTn section of the print subject, under OpenFrame Configuration.
-
To submit SYSOUT through an internal reader, define the common library paths to the DRIVER_PATH key’s VALUE in the INTRDR section of the print subject, in OpenFrame Configuration.
-
To use an external writer, set the external writer name and necessary shared library path in the WRITER section of the print subject, in OpenFrame Configuration.
For more information about how to configure the print subject, refer to OpenFrame Configuration Guide. |
2. OUTPUT
After the JCL of a job is executed, the created spool data sets are handled by the output step.
The output is determined by the JCL SYSOUT and OUTPUT parameters. A spool data set usually acts as an output, there can be two or more outputs, as shown in the following example.
In the following example, a spool data set is used in several output statements.
//OUT01 OUTPUT FORMDEF=FORM1 //OUT02 OUTPUT FROMS=LETTER01,FROMDEF=LTR1,PAGEDEF=LTR4 //PRT DD SYSOUT=A,OUTPUT=(*.OUT01,*.OUT02)
The example JCL above includes two output DDs: PRT DD as OUT01 and OUT02. This means that when the job finishes, the output of OUTPUT01 and OUTPUT02 will be processed.
-
When OUTPUT01 is processed, the spool data set contents (defined in the PRT DD) is printed to basic paper, in FORM1 format.
-
When OUTPUT02 is processed, the spool data set contents is printed to LETTER01 paper, in LTR1 format and in LTR4 page form.
3. OUTPUT Processing
When the job is complete, the spool data set is registered in the OUTPUTQ at the output level. The registered output unit is scheduled by ofrpmsvr either for processing through a general printer or an external writer or for submission to an internal reader. Subsequently, ofrpmsvr checks the OUTPUT status from OUTPUTQ and gets the output to compare the OUTPUT class with the CLASS key’s VALUE in the PRINTn section of the print subject, under OpenFrame Configuration, for scheduling and processes the output according to its OUTPUT disposition.
3.1. OUTPUT Status
The output status is registered in OUTPUTQ. The status changes according to ofrpmsvr processing.
The following are output statuses
Status | Description |
---|---|
Unable |
Initial status of a newly created output. The output is not scheduled yet and waits in OUTPUTQ. |
Ready |
Not scheduled yet but dequeued from OUTPUTQ. |
Scheduled and sent to PRINTERn, an internal reader, or an external writer. |
|
Hold |
Waits in OUTPUTQ after output processing if OUTPUT DISPOSITION is LEAVE. |
Cancel |
OUTPUT processing is canceled by the user. |
Error |
Error occurring in the job sent to PRINTERn, an internal reader, or an external writer. |
Outputs registered during job processing are in U status. ofrpmsvr periodically scans OUTPUTQ, dequeues outputs in U or R status, changes their status to R, and schedules jobs. Then, ofrpmsvr sends the outputs to the printer, internal reader, or external writer and changes their status to P. If OUTPUT DISPOSITION is LEAVE, successfully processed output is changed to H status and waits in OUTPUTQ. If the output is purged by a user command through tjesmgr during processing, the output status is changed to C. If printing processing fails, the output status is changed to E.
3.2. OUTPUT Class
The output class is a 1-byte character (between A-Z or 0-9) that is assigned to a specific output unit. It is defined in the JCL file.
If an output class is defined in the output unit, and another output class is later defined in a SYSOUT statement, the class defined in the SYSOUT statement takes priority.
In the following example, the output class of PRINT DD is set to Y.
//OUT1 OUTPUT CLASS=Y,FORM=TEST //PRINT DD SYSOUT=(,),OUTPUT=*.OUT1
In the following example, an output class is defined in the SYSOUT data and is set to A. This statement takes priority over the previous statement.
//PRINT DD SYSOUT=A
If the output class is defined as an asterisk (*), the class specified as MSGCLASS in the job statement is used as an output class.
In the following example, the output class of the PRINT DD statement is defined as X.
//COPY02 JOB CLASS=I,MSGCLASS=X,MSGLEVEL=(1,1) ... //PRINT DD SYSOUT=*
Output Class Priority
An output class is specified according to the following priority order.
-
SYSOUT=class
-
OUTPUT CLASS=class
-
JOB MSGCLASS=class
If a class is specified in SYSOUT, the class is primarily used even if another class is specified in an output or a job statement.
If no class is specified in SYSOUT (SYSOUT=* or SYSOUT=(,)), the value specified in the OUTPUT CLASS parameter (if present) is applied. If no class is specified in SYSOUT and the CLASS parameter is not specified in the OUTPUT statement, the value specified in MSGCLASS of the JOB statement is used as the output class. If neither of them specifies the class, the value specified in the VALUE of the MSGCLASS key in the JOB section from the tjclrun subject, under OpenFrame Configuration, is used.
3.3. OUTPUT Disposition
The output disposition of a job can be categorized as either 'normal' or 'abnormal' depending on whether or not the job is completed successfully.
Job processing steps, and their possible output dispositions, are as follows:
The following describes output dispositions.
Disposition Type | Description |
---|---|
WRITE |
Schedules a print action for the output unit. It is then removed from the OUTPUTQ. |
HOLD |
Prevents the output unit from being scheduled and processed until the user releases the hold. When the hold is released, the disposition of the output unit changes to WRITE. |
KEEP |
Schedules a print action for the output unit, as with WRITE. However, the disposition changes to LEAVE after the output is printed. |
LEAVE |
Waits in OUTPUTQ without getting the output unit scheduled until the user releases the disposition. Once released, the disposition changes to KEEP. |
PURGE |
Removes the output unit from OUTPUTQ. |
Output dispositions can be defined in the OUTPUT statement in a JCL file.
-
Specify the OUTPUT statement of JCL.
In OUTPUT DISPOSITION of PRINT DD, WRITE is set for normal processing and PURGE is for abnormal processing. That is, when JCL is performed and job is closed normally, output is processed. When job is closed abnormally, output is not processed.
//OUT1 OUTPUT OUTDISP=(WRITE,PURGE) //PRINT DD SYSOUT=(A,),OUTPUT=*.OUT1
-
In the following example, the SUBM DD has the INTRDR attribute. When the job is complete, the SYSOUT data is submitted to the internal reader.
//SUBM DD SYSOUT=(A,INTRDR)
-
If the disposition is not defined in the OUTPUT statement of JCL, the values set according to the output class in OpenFrame Configuration are used instead.
The output disposition configurations are defined according to the class set in the OUTCLASS section of the tjes subject under OpenFrame Configuration, as follows:
In the following example, an output unit with an output class of A is assigned '(WRITE,WRITE)', while an output unit with the output class of B is assigned '(HOLD,PURGE)'. If no disposition is defined for an output class in the OUTCLASS section, '(PURGE,PURGE:80)' is used by default.
$ ofconfig list -s tjes -sec OUTCLASS =================================================================================== SUBJECT | SECTION | KEY | VALUE =================================================================================== tjes | OUTCLASS | A | WRITE,WRITE | | B | HOLD,PURGE ===================================================================================
The OUTPUTQ includes some output units to be printed and other output units to be submitted as jobs (after being processed by the internal reader).
Any outputs that are processed by the internal reader are given an output disposition of either WRITE or KEEP. If the output unit is configured in the INTRDR section of the print subject, under OpenFrame configuration, then it is submitted to the internal reader regardless of its output class.
If outputs to be printed are given either WRITE or KEEP as the output disposition and the output class matches the information registered in the PRINTERn section of the print subject under OpenFrame Configuration, printing is executed. If the class information registered in the PRINTERn section includes the output class of SYSOUT, ofrpmsvr sends the data and print resource information to an external printer solution by using the commands and shared libraries specified in the PRINTERn section.
3.4. Internal Reader
The internal reader is a module that allows an online CICS or batch program to submit a job to TJES. All active jobs in OpenFrame can be submitted by the internal reader.
To use an internal reader, specify SYSOUT=(out_class,INTRDR) in the DD statement so that the information stored in the DD is printed into the internal reader.
The following example uses an internal reader.
########################################################################### ## IEBEDT05 - iebedit SYSUT1 JCL and extract RMSTEP1 only. ## ## then submit it to intrdr ## ########################################################################### //IEBEDT05 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //IEBEDT EXEC PGM=IEBEDIT //SYSIN DD * EDIT START=,TYPE=INCLUDE /* //SYSUT2 DD SYSOUT=(A,INTRDR) //SYSUT1 DD DATA JCL content to be submitted to INTERNAL READER /* //
In this example, the job copies JCL SYSUT1 DD to SYSUT2, which is then printed to the internal reader of CLASS A.
If USER and PASSWD are not specified as in the previous example, the internal reader submits the JCL by using the VALUEs of the USERNAME and PASSWORD keys specified in the INTRDR section of the tjes subject under OpenFrame Configuration.
3.5. External Writer
The external writer is a module that processes outputs generated after job processing by using other shared libraries such as SMTP.
To use an external writer, specify SYSOUT=(out_class,external_writer_name) in the DD statement and the matching key and value (external_writer_name) in the WRITER section of the print subject under OpenFrame Configuration. Currently, only SMTPP (SMTP) is supported.
The following example uses SMTPP (SMTP) as external writer.
//EXTJOB JOB (MDB114J),' ', // CLASS=A, // MSGCLASS=K, // MSGLEVEL=(1,1), // NOTIFY=&SYSUID //* //JCLLIB JCLLIB ORDER=(SCDC.PROD.JCLLIB) //* //JOBLIB INCLUDE MEMBER=JOBLIB //JSTEP01 EXEC PGM=IEBGENER //SYSIN DD DUMMY (MODE=I) //SYSPRINT DD SYSOUT=* //SYSUT2 DD SYSOUT=(B,SMTPP) //SYSUT1 DD * HELO JES2PRD1 MAIL FROM:<sender@tmax.co.kr> RCPT TO:<recipient@tmax.co.kr> /* // DD * DATA SUBJECT: SMTP TEST THIS IS A TEST MAIL, From OpenFrame PROCESSING. /* //*
In this example, the job copies JCL SYSUT1 DD to SYSUT2 and then sends an email to SMTP server through SMTPP (SMTP), which is an external writer specified in SYSOUT.