If a character cannot be represented in the other character set when implicit or explicit conversion takes place (by calling the FUNCTIONs without a second parameter) because there is no equivalent, the exceptional condition EC-DATA-CONVERSION occurs. In this case the replacement character "period" (".") which is defined in the system is used.
If the check for the exception condition is enabled by the associated TURN directive, the exceptional condition is triggered and can, if required, be treated in a corresponding USE procedure.
Example 12-18
01 n PIC N VALUE NX"E23A". ... IF FUNCTION DISPLAY-OF(n) = "a" (1) THEN ... ELSE ... (2) END-IF (3)
(1) The exceptional condition EC-DATA-CONVERSION occurs (NX'E23A' has no EBCDIC equivalent):
If the check for the exceptional condition is enabled with >>TURN EC-DATA-CONVERSION CHECKING ON and a USE procedure exists which is exited with RESUME AT NEXT STATEMENT, the procedure continues after (3).
If the check is not enabled or no corresponding USE procedure exists, the procedure continues with (2) because the replacement character used (period, ".") is not equal to "a".