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
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.
||B2||Return code to be set by the exit:
0 = No modification
When a report is printed, 97 and 99 have the same effect.
||A251||The record to be printed.|
||P7||The current record number.|
||A1||Flag with the following meaning:
F = First record,
||A250||Work area for the printer exit.|
||A25||The name of the report being printed.|
||A25||The name of the bundle being printed.|
||A3||The record format of the printout.|