
Special statements are provided for the editing of character strings and byte strings (that is, data objects with the types c, string or x, xstring), for example CONCATENATE, FIND, REPLACE, SHIFT, or SPLIT.
In character string processing, these statements are complemented by string functions and string expressions, or replaced by them entirely. These functions and expressions can be used directly in operand positions. Regular expressions can be used for pattern-based find and replace actions in character string processing.
Example
This example demonstrates the following options when chaining character strings:
Statement CONCATENATE
Chaining operator &&
String template | ... | with embedded expressions { ... }
DATA result TYPE string.
DATA(text1) = 'Hello'.
DATA(text2) = 'World'.
CONCATENATE text1 text2 INTO result SEPARATED BY ' '.
result = text1 && ' ' && text2.
result = |{ text1 } { text2 }|.