This operation code defines columns in the data when printing with a proportionally spaced font.
CALL "WIN$PRINTER" USING WINPRINT-SET-DATA-C0LUMNS, CHARACTER-POSITION GIVING RESULT
CHARACTER-POSITION Numeric value | One or more numeric values indicating each position that starts a new column of data. |
This is one of two op-codes that control the input by specifying the zones in the print line. (This is similar to the DATA-COLUMNS property of the LIST-BOX control.)
Specify one or more numeric values that represent the character position from the left side of the print record that begins a new column of data. Data starting at this column and extending to the beginning of the next column (or end of the print record) will be printed together as a single column on the page. The first column always starts at position 1 of the print record. Initially, there is only one data column, which starts from the beginning of the print record and extends to the end of the print record.
Column specifications are additive. If you call WIN$PRINTER with this operation multiple times, all the columns specified are combined and appear in the resulting printout. Column specifications last until they are cleared, or the process that is running shuts down. See WINPRINT-CLEAR-DATA-COLUMNS for information on how to clear column specifications.
In the following example, the print line of a three column report is made ready for printing using a proportional font:
01 PRINT-RECORD. 03 CUST-NAME PIC X(30). 03 FILLER PIC X. 03 CUST-PHONE PIC X(15). 03 FILLER PIC X. 03 CUST-BALANCE PIC ZZZ,ZZZ,ZZZ.99-. CALL "WIN$PRINTER" USING WINPRINT-SET-DATA-COLUMNS, 31, 47.
Note that this is the same as the following:
CALL "WIN$PRINTER" USING WINPRINT-SET-DATA-COLUMNS, RECORD-POSITION OF CUST-PHONE, RECORD-POSITION OF CUST-BALANCE.