How to: |
CONCAT removes trailing blanks from a string and then concatenates another string to it. The output is returned as variable length alphanumeric.
CONCAT(string1, string2)
where:
Alphanumeric
Is a string whose trailing blanks will be removed.
Alphanumeric
Is a string whose leading and trailing blanks will be preserved.
The following request concatenates city names with state names. Note that the city and state names are converted to fixed length alphanumeric fields before concatenation.
DEFINE FILE WF_RETAIL_LITE CITY/A50 = CITY_NAME; STATE/A50 = STATE_PROV_NAME; CONCAT_CS/A100 = CONCAT(CITY,STATE); END TABLE FILE WF_RETAIL_LITE SUM CITY AS City STATE AS State CONCAT_CS AS Concatenation BY STATE_PROV_NAME NOPRINT WHERE COUNTRY_NAME EQ 'United States' WHERE STATE LE 'Louisiana' ON TABLE SET PAGE NOLEAD END
The output is shown in the following image.