String Processing for Byte Strings
The IN BYTE MODE addition
The X variants of the string statements are distinguished from the character string commands with the IN BYTE MODE addition. The IN CHARACTER MODE addition can be used optionally for the character string variants.
If you define the IN BYTE MODE addition, only X fields and X strings are allowed as arguments. There is a syntax or runtime error if arguments of a different type are passed.
CLEAR ... WITH IN BYTE MODE
CONCATENATE x1 ... xn INTO x IN BYTE MODE
FIND ... IN BYTE MODE
REPLACE ... IN BYTE MODE
REPLACE f WITH g INTO h IN BYTE MODE
SEARCH x FOR x1 IN BYTE MODE
SHIFT x ... IN BYTE MODE
SPLIT ... IN BYTE MODE
The full length of the X fields are always used in all string commands for byte strings, so that bytes with contents X'00' are never truncated at the end of the field. There are no variants that use search patterns for the FIND, SEARCH and REPLACE statements with the IN BYTE MODE addition.
The string length for byte strings can be defined with the XSTRLEN function. XSTRLEN returns the current length for X strings and the defined length in bytes for X fields, where null bytes at the end of fields are also counted.
String comparison operations
The X variants of the string comparison operations are distinguished from the string variants by the BYTE prefix. Only X fields and fields of type XSTRING are allowed as arguments for these operations.