A printer exit is an installation-written NCL procedure. The printer exit enables the implementation of output destinations other than JES or VTAM, for example, a mailing system or a file.
When a print request that has a destination of a printer exit is closed or released, the printer exit is executed by the system to perform initialization processing, then once for each line of data and finally to perform termination processing.
The variables passed to the printer exit by the system are as follows:
This variable is set to indicate the processing that is to be performed. This variable is set to one of the following values:
Initialization processing is to be performed
Data line processing is to be performed
Termination processing is to be performed
This variable is set to indicate the type of termination when the &$PSACTION variable is set to TERM. This variable is set to one of the following values:
Normal termination
Terminated by printer exit setting return code 8
Print request canceled by the procedure sending the output
This variable is set to the exit data defined in the printer definition. Exit data in the printer definition is overridden on the OPEN call to $PSCALL.
This variable is set to the user ID of the user who generated the print request.
This variable is set to the number of the print request.
This variable is set to the date the print request was generated in the format DD-MMM-YYYY.
This variable is set to the time the print request was generated in the format HH.MM.SS.
This variable is set to the line of data that is to be processed.
This variable is set to the skip amount specified for the line of data. Valid values are NEWPAGE, 0, 1, 2, and 3.
This variable is set to the underline setting specified for the line of data. Valid values are 1 and 2.
This variable is set to the bold setting specified for the line of data. Valid values are YES and NO.
The variables that is set by the printer exit are as follows:
These variables is set to user data, where c is 1 to 5 alphanumeric and/or national characters. These variables are never set or cleared by the system, therefore must be completely managed by your installation.
The system variable &RETCODE is set by the printer exit as follows:
Continue processing.
An error occurred. Terminate processing and set the status of the print request on the spool to HELD-ERROR or DIRECT-ERR. &SYSMSG is set to an error message that is to be written to the activity log and stored in the error message field in the printer request.
| Copyright © 2009 CA. All rights reserved. |
|