This variable allows you to generate a list of the names of printers installed on a Windows PC. It does this by altering the behavior of some of the operations of the WIN$PRINTER library routine. When WINPRINT_NAMES_ONLY is set to a value of 1 (on, true, yes), the WIN$PRINTER operations that retrieve printer information return only the names of installed printers, rather than the real-time status of all available printer capabilities.
This variable can be set in the configuration file or directly in your program with the following code:
SET ENVIRONMENT "WINPRINT-NAMES-ONLY" TO "1".
When this variable is turned on, the following operations of the WIN$PRINTER library routine are affected:
WINPRINT-GET-PRINTER-INFO WINPRINT-GET-PRINTER-INFO-EX WINPRINT-GET-CURRENT-INFO WINPRINT-GET-CURRENT-INFO-EX
Instead of returning detailed information about the capabilities of each printer (duplex, copying, etc.), the routine returns only the name of the printer. This can provide a significant performance improvement, particularly with networked printers.
If you are using the default printer settings, set the WINPRINT_NAMES_ONLY variable to 1, generate a list of printer names using WINPRINTER-GET-PRINTER-INFO-EX (see the WIN$PRINTER documentation in the Appendices of the ACUCOBOL-GT manual set, or refer to the sample program prndemox.cbl), and select the desired printer.
If you want to modify the printer settings, such as the number of copies or the paper orientation, you should perform the steps described above, and then set WINPRINT_NAMES_ONLY back to the default of 0 (off, false, no). You may then use WINPRINTGETPRINTERINFOEX to obtain detailed information about the capabilities of the selected printer.
For more information about Windows printing, refer to WIN$PRINTER in Appendix I.