%UCS2 converts the value of the expression from character, graphic,
or UCS-2 and returns a UCS-2 value. The result is varying length if
the parameter is varying length, or if the parameter is single-byte
character.
The second parameter, ccsid, is optional
and indicates the CCSID of the resulting expression. The CCSID defaults
to the default UCS-2 CCSID of the module
as specified by control keyword CCSID(*UCS2).
If the parameter is a constant, the conversion will be done at
compile time.
If the conversion results in substitution characters, a warning
message is issued at compile time. At run time, status 00050 is set
and no error message is issued.