COLHDG (Column Heading) keyword for physical and logical files

Use this field-level keyword to specify column headings used as a label for this field by text management, the query utility, the data file utility (DFU), and the screen design aid (SDA).

The format of the keyword is:
COLHDG('line-1' ['line-2' ['line-3']])

A maximum of three lines of 20 characters each is allowed. Each line of the column heading must be enclosed in single quotation marks ('). Use double single quotation marks (' ') to specify single quotation marks within column headings. Use one or more blanks to separate the first column heading line from the second and the second from the third.

For a physical file, if you do not specify COLHDG and it is not retrieved from a referenced field, the field name is used. If you do not specify COLHDG for a logical file, the column heading from the physical file is used, except when the field is a concatenation of fields; in this case, the default is the field name.

If you specify COLHDG but do not specify TEXT, 50 positions of column heading information are used as text. For example, COLHDG('Order' 'Date') is equivalent to TEXT('Order Date').

Example

The following example shows how to specify the COLHDG keyword for a physical file.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00150A            ORDDAT         5  0       COLHDG('Order' 'Date')
00160A            NAME          20          COLHDG('Customer''s Name')
00170A            CITY          20          COLHDG('Customer' 'City' 'Field')
     A

Decimal positions or data type must be specified for ORDDAT since Order Date is a numeric field (denoted by NNNNN below).

The following display illustrates how the column headings can appear when running text management, query, DFU, or SDA.
Customer
Order                                 City
Date       Customer's Name            Field
NNNNN      XXXXXXXXXXXXXXXXXXXX       XXXXXXXXXXXXXXXXXXXX