Understanding the Initialize Logical Printer Name System Function

You can use the Do Initialize Printer event to specify a printer to be used by the system when the batch application processes. The Do Initialize Printer event is a report-level event located on the File menu. Using this event, you can print the same report to different printers based on criteria that you define. The event rules located on this event are the first event rules processed at runtime. The event rules are also processed each time a subsystem trigger record is processed. The Initialize Logical Printer Name system function resolves and validates the printer name that you pass to it. The batch engine uses the printer name, if valid, to obtain a printer device context. Portions of this device context can be overridden when the appropriate settings in the report specifications are set.

The Initialize Logical Printer Name system function is ignored if placed on any event other than the Do Initialize Printer event. If you place this system function on a different event, the system generates a message in the jdedebug log.