Concatenates the elements of an array or a structure and returns the results.
STRING(s)
s is an arithmetic value, string value, picture value, or an array or structure containing all string or picture values.
DECLARE S(4) CHAR(1); S(1) = 'A'; S(2) = 'B'; S(3) = 'C'; S(4) = 'D'; STR = STRING(S); /* 'ABCD' */
Description
The STRING function concatenates the elements of an array s or a structure s and returns the results. If s is scalar, it is converted to a string.
The result is converted to a string according to the rules for data type conversion given in the chapter Data Type Conversions.
For a description of the STRING function's use as a pseudovariable, see the section Assignment in the chapter Statements.