This operation code allows you to select a specific printer and set properties, extending the functionality of WINPRINT-SET-PRINTER.
CALL "WIN$PRINTER" USING WINPRINT-SET-PRINTER-EX, WINPRINT-SELECTION
WINPRINT-SELECTION | Group item defined in
winprint.def as follows:
01 WINPRINT-SELECTION. 03 WINPRINT-NAME PIC X(80). 03 WINPRINT-PORT PIC X(80). 03 WINPRINT-DRIVER PIC X(80). 03 WINPRINT-DRV-VERSION SIGNED-INT. 03 WINPRINT-NO-OF-PRINTERS SIGNED-SHORT. 03 WINPRINT-IS-DEFAULT SIGNED-SHORT. 03 WINPRINT-COPIES SIGNED-SHORT. 03 WINPRINT-ORIENTATION SIGNED-SHORT. 03 WINPRINT-QUALITY SIGNED-SHORT. 03 WINPRINT-CURR-ORIENTATION SIGNED-SHORT. 03 WINPRINT-CURR-COPIES SIGNED-SHORT. 03 WINPRINT-DUPLEX SIGNED-SHORT. 03 WINPRINT-COLLATE SIGNED-SHORT. 03 WINPRINT-COLOR SIGNED-SHORT. 03 WINPRINT-CURR-DUPLEX SIGNED-SHORT. 03 WINPRINT-CURR-COLLATE SIGNED-SHORT. 03 WINPRINT-CURR-PAPERSIZE SIGNED-SHORT. 03 WINPRINT-CURR-TRAY SIGNED-SHORT. 03 WINPRINT-CURR-COLOR SIGNED-SHORT. 03 WINPRINT-JOB-TITLE PIC X(80). This group item has numerous conditional variables. See winprint.def for the complete list. |
The printer may be open or closed to perform these functions. There is no need to reset any of these functions. WINPRINT-SELECTION should be initialized prior to use. WINPRINT-SET-PRINTER-EX has all the same values as WINPRINT-SET-PRINTER plus the following additional values:
WINPRINT-CURR-DUPLEX | If WINPRINT-DUPLEX is set to a positive value greater than one, you may set this to one of the following values:
|
WINPRINT-CURR-COLLATE | If WINPRINT-COLLATE is set to a positive value greater than one, you may use WINPRINT-CURR-COLLATE to turn collating on or off. |
WINPRINT-CURR-PAPERSIZE | Because of the huge variety of paper sizes supported by different printers, this can be set to any value. Values less than 42 should correspond to the PAPER-SIZES table in winprint.def. Values greater than 255 are user defined. The runtime accepts any value, no validation is performed. |
WINPRINT-CURR-TRAY | Because of the huge variety of paper trays supported by different printers, this can be set to any value. Values less than
16 should correspond to the PAPER-TRAYS table in
winprint.def. Values greater than 15 and less than 256 are undefined. Values greater than 255 are device specific. The runtime accepts
any value, no validation is performed.
Values 12 and 13 are not defined in the PAPER-TRAYS table in winprint.def. This matches a similar gap in the Windows API. Refer to prndemox.cbl for an example of how to compensate for these undefined values. |
WINPRINT-CURR-COLOR | If WINPRINT-COLOR is set to a positive value greater than one, you may use this to turn color printing on or off. |