DATA-COLUMNS (numeric)

This special property describes where each column begins in records added to the grid. Columns are defined by character positions in the raw data, with the first character being position 1. For example, the following data item:

01 LIST-DATA.
  03  NAME             PIC X(20).
  03  PHONE-NUMBER     PIC X(15).
  03  STATE            PIC X(2).

would normally be displayed in three columns, one at position 1 (NAME), one at position 21 (PHONE-NUMBER), and one at position 36 (STATE). Each time you set DATA-COLUMNS to a positive value, a new column is created at that position. Setting DATA-COLUMNS to zero clears all the existing column definitions.

Note that there is always a column at position 1, so setting position 1 is not required. An example DATA-COLUMNS setting that would match the LIST-DATA group item, above, would be:

DATA-COLUMNS = (21, 36)

You can also specify DATA-COLUMNS using the RECORD-POSITION construct.