The OS/400 program reads the display buffer and prints the display image using the specified printer file. The printer file that you specify as a parameter value for this keyword can be either an externally described or a program-described file. It also can be either spooled or nonspooled. If you specify an externally described printer file, it must contain a record format with the same name as the file.
The printer file must exist and be authorized to the user of the display when the Print key is pressed. This also applies to the library name if it is specified. If the OS/400 program is unable to perform the print function on the specified printer file, it attempts to use the printer file specified on the PRTFILE parameter of the CRTDEVDSP or the CHGDEVDSP command. SPOOL(*YES) should be specified on the CRTPRTF or CHGPRTF command to prevent the keyboard from locking.
If you do not specify the library name, the current library list at program run time is used.
See OPENPRT (Open Printer File) Keyword for Display Files for details of when the printer file is opened and closed.
Figure 226 shows how to specify that the display is to be directed to printer file, LIB1/PRINTFILE1.
Figure 226. Specifying the PRINT Keyword with Printer File Specified
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A PRINT(LIB1/PRINTFILE1) 00020A R RECORD1 A
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.