If a printer exit is specified in the logical printer definition, control is passed to this exit at print time for each record to be printed. Here you can insert, modify or suppress records.
Usually a printer exit is used to insert escape sequences, so that the printer can select special print styles.
As in the examples PRCANON
and PRKYOCER
in
the library SYSNOMS
, this could be an escape sequence at the
beginning of the printout to switch to landscape mode.
Ideally, the printout should contain mnemonics for all kinds of print attributes (highlighting, underscoring, etc.) which are translated into escape sequences depending on the physical printer to be used. In this way, the printout is independent of any physical printer type.
Parameter | Format/Length | Description |
---|---|---|
PRT-RC
|
B2 | Return code to be set by the exit:
0 = No modification When a report is printed, 97 and 99 have the same effect. |
PRT-RECORD
|
A251 | The record to be printed. |
PRT-RECNO
|
P7 | The current record number. |
PRT-FLAG
|
A1 | Flag with the following meaning:
F = First record, |
PRT-WORK
|
A250 | Work area for the printer exit. |
PRT-REPORT
|
A25 | The name of the report being printed. |
PRT-BUNDLE
|
A25 | The name of the bundle being printed. |
PRT-RECFM
|
A3 | The record format of the printout. |