If your configuration uses a DBCS code page, you can use the SFTINS function to insert the shift code into DBCS data.
SFTINS(source_string, length, output)
Is the string into which the shift code will be inserted enclosed in single quotation marks (') or the field containing the string.
Is the length of the source string in bytes or a field that contains the length. The string can have a mixture of DBCS and SBCS characters. Therefore, the number of bytes represents the maximum number of characters possible in the source string.
Is the field to which the result is returned or the format of the output value enclosed in single quotation marks (').
In the following, SFTINS inserts the shift code into the COUNTRY_DEL field (which is the COUNTRY field with the shift code deleted):
COUNTRY_INS/A10 = SFTINS(COUNTRY_DEL, 10, 'A10');
The output displays the original COUNTRY field, the COUNTRY_DEL field with the shift code deleted, and the COUNTRY_INS field with the shift code re-inserted.
The output in ASCII environments, is shown in the following image:
The output in EBCDIC environments is shown in the following image: