If necessary, EDT converts data from each permitted character set into another permitted character set. In such cases, if characters from the source data are not present in the target character set then a substitute character is used if the user has defined one with the statement @PAR SUBSTITUTION-CHARACTER. By default, no substitute character is defined (SUBSTITUTION-CHARACTER=*NONE
).
When output is sent to a terminal in interactive mode, then, unlike in the case of other output destinations, the device-specific smudge character is used. If no substitute character is defined then a blank is used for all characters that are not present in the target character set when output is sent to SYSOUT/SYSLST
. In all other cases, conversion is rejected, i.e. the associated statement is not executed.
The @CHECK statement (format 2) can be used to check whether a line range can be converted without loss into a target character set. This not only checks whether all the characters are present in the target character set but also that no length restriction will be exceeded. Strings may be significantly longer when converted into a Unicode character set.
Note
XHCS only converts compatible character sets with the result that conversion may pass via a Unicode character set (since these are always compatible).