STRING_LENGTH macro
The STRING_LENGTH macro is available only in IBM® Campaign.
Syntax
STRING_LENGTH(data)
Parameters
data
ASCII text string values to compute the length of. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your IBM® product.
Description
STRING_LENGTH returns the length of each string value in the specified data range. It returns one new column for each input column, each containing the length of the corresponding text string.
*
If STRING_LENGTH is applied to columns containing numerical data, it returns zeros.
Examples
Creates a new column named TEMP containing the value 4.
Creates a new column named TEMP containing the value 0.
Creates a new column named TEMP, where each value is the length of the string in the corresponding row of column V1.
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the lengths of the strings in the corresponding rows of column V1, the values of the VX column are the lengths of strings in corresponding rows of column V2, and the values of the VY column are the lengths of the strings in corresponding rows of column V3.
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the lengths of the strings in rows 1-50 of column V1, the values of the VX column are the lengths of strings in rows 1-50 of column V2, and the values of the VY column are the lengths of the strings in rows 1-50 of column V3.
Related functions