Use the LABEL SQL command. If you are using the STRSQL green screen command, you can query it. The LABEL command can be used to set column and column headers.
The following is an example of using the LABEL command to retrieve the column text for two fields in a file named TESTFILE1. The fields are named FIELD1 and FIELD2 in this example:
LABEL ON COLUMN TESTFILE1 (FIELD1 TEXT IS 'My Field 1 text', FIELD2 TEXT IS 'My Field 2 text')
The following is an example of using the LABEL command to get the column headers that will appear in the query results:
LABEL ON COLUMN TESTFILE1 (FIELD1 IS 'My field Heading 1', FIELD2 IS 'My field Heading 2')
When creating column headings, you get 60 characters in the field. The first 20 characters are line 1. The second 20 characters are line 2. The third 20 characters are line 3. In the above example, the field headers look like this:
My field my field
Heading 1 Heading 2
Tracy probst
source share