
When operands are converted
to a Unicode CCSID, the following rules are
used to determine the exact Unicode CCSID to use
- If the type of either operand is character, the operands
are converted to UTF-8.
- Otherwise, if the type of neither operand is UCS-2, the
operands are converted to the UCS-2 CCSID of the module.
The UCS-2 CCSID for the module defaults to 13488;
you can set it to a different CCSID using keyword
CCSID(*UCS2)
on a control statement.
- Otherwise, if the type of only one operand is UCS-2,
the other operand is converted to the CCSID of the UCS-2
operand.
- Otherwise, if one of the UCS-2 operands has the
default UCS-2 CCSID of the module, that CCSID is used.
- Otherwise, the operand with the shorter defined
length is converted to the CCSID of the longer operand.

Warning:
- Some CCSID conversions may not be able to convert
all characters, if a character in one operand does not
exist in the character set of the other operand.
For example, if you assign data from a Unicode operand
to an operand whose CCSID represents a single character
set, such as an EBCDIC CCSID, some of the characters
in the Unicode operand might be from a different character
set.
In this case, a substitution character will be placed
in the target operand.
By default this situation results in the non-error status
code 50.
However, if you specify control
keyword CCSIDCVT(*EXCP),
this situation will result in the error status 00452.
- You can get a listing of all the CCSID conversions
that might be performed in the module using
control keyword CCSIDCVT(*LIST)
This listing includes warnings about CCSID
conversions that might result in substitution characters.
See
CCSIDCVT(*EXCP | *LIST) for more information
about substitution characters and
the CCSIDCVT keyword.
