The STRING function allows you to set a field or variable to a constant literal value. STRING also concatenates two (2) or more data strings by appending the data strings in the sequence specified to the first data string.
Category
String
Syntax
STRING(data_string[, data string])
Parameter | Description |
---|---|
data_string | One (1) or more source data strings. These data strings can be a field from a source datastore, a variable, a constant or the result of another Function that are to be concatenated. |
Example 1
Concatenate the literals Hello and World with a space in between them (3 source data strings) and map the result to target field TGT_STRING.
TGT_STRING = STRING ('HELLO', ' ', 'WORLD')
Returns the value HELLO WORLD and maps the result to the target field.
Example 2
Concatenate the literals Hello and World with a space in between them (3 source data strings) and update variable V_DATA_STRING with the result.
V_DATA_STRING = STRING ('HELLO', ' ', 'WORLD'))
Sets the variable V_DATA_STRING with the value HELLO WORLD.