If you want to control the format of the printout yourself using embedded control codes, simply assign your print file to -P SPOOLER-DIRECT or to -Q printername using the DIRECT=ON option. For example, to assign the print job PRINTER1 to the spooler and retain direct control over formatting, enter the following line in your COBOL configuration file (CBLCONFI):
PRINTER1 -P SPOOLER-DIRECT
Or, use the following command to assign PRINTER1 to the spooler for printing to a specific printer while retaining direct formatting control:
PRINTER1 -Q printername;DIRECT=ON
Both of these methods cause the print job to be sent to the printer via the Windows spooler, but the program does not use the spooler to format the pages. You must use embedded control codes to handle formatting (much as you would under UNIX if you used the UNIX spooler).
When using the -P SPOOLER-DIRECT option, you may use the WIN$PRINTER library routine to choose a printer. But because you completely control the printer, the various options provided by WIN$PRINTER are ignored. For example, WIN$PRINTER does not set the page size, page orientation, or font. Information returned from WIN$PRINTER, such as number of lines and columns on the page, may not be accurate and should not be used.