You can use a printer device for 3270 printer support. Printer support is handled by 3270 printer emulators, which interpret the 3270 printer data stream and send it to a system printer.
Use the printer exit program DFHUPRNT to redirect printed output to different print type 3270 devices with multiple physical printers or print spooler queues.
DFHUPRNT must reside on the transaction path for your enterprise server. The exit program is called during the processing of 3270 printed output after a SEND with PRINT event. These events are buffered and result in an OPEN call, a number of PRINT calls, and a CLOSE call.
When the OPEN call is made, the control block contains the terminal ID of the target 3270 print device. You can use this ID to identify the target system printer through a table, for example.
An extract from the exit program is shown below:
open-printer section. evaluate true when upi-printer-termid = 'L860' string '\\nwb-savprint' delimited by size '\training-hp4v' delimited by size into ws-filename end-string when upi-printer-termid = 'L861' string '\\nwb-savprint' delimited by size '\training-hp5v' delimited by size into ws-filename end-string when upi-printer-termid = space move 'Win2PDF' to ws-filename end-evaluate open extend print-file
If you only have one destination printer, instead of using DFHUPRNT you can start a printer emulator by configuring the following fields on the SIT page in ESMAC:
Field | Contents |
---|---|
3270 Print | Y |
Print Destination | Device name for printed output |
The enterprise server then starts a printer emulator for each entry in the terminal table which is:
The netname defined in the terminal table must be unique to the enterprise server region. The terminal ID for the printer is taken from the terminal definition. To avoid conflicts with automatically assigned netnames, you should assign netnames to printers counting downwards from PRNZZZZ.