Enabling CICS Printer Support

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
Note: Regardless of whether you use DFHUPRNT or not, the 3270 Print field must be defined as Y if you want to enable CICS printer support.

The enterprise server then starts a printer emulator for each entry in the terminal table which is: