-Q <printername>

If you want the Windows spooler to format the pages of your report, but you want to use a particular printer, assign your print file to:

PRINTER1 -Q \\printername

in the configuration file (CBLCONFI). Printername is the printer designation as given in the Printers folder under Settings in the Start menu. The name may be up to 80 characters long and contain embedded spaces. The name may not include the semicolon character (;) or be surrounded by single or double quotes. The pages are printed in the manner described in -P SPOOLER below. The sample programs "graphprn.cbl" and "prndemox.cbl" contain examples of these functions.

To determine a valid printername, use the WIN$PRINTER library routine to obtain the name of the desired printer. (This is described under the WINPRINT-SET-PRINTER operation code in Specifying a Printer.) Then add the following line to your code:

MOVE "-Q \\printername" TO WS-PRINTER-NAME.

When the runtime opens a file assigned to -Q printername it sets the Windows print spooler to use this printer. The printer driver must be installed on the computer from which you print. If printername is not recognized by the runtime, a dialog box allows you to choose a printer manually.