Design of Unicode in control language

With the Unicode support in control language (CL), the command processing program (CPP) can always get its data in either extended binary-coded decimal interchange code (EBCDIC) or UTF-16, regardless of how the data is passed to CL. This can best be described as having two related parts that together help you pass Unicode data to your application.

Parameter support

With the PARM support in CL, you can specify if you want this parameter viewed as EBCDIC or Unicode. EBCDIC is the default. By specifying Unicode, the CPP always receives this value in Unicode, even if it is provided to CL as EBCDIC.

Parser support

The parser support in CL converts the provided input, so that the CPP always gets the type of value you specified in either EBCDIC or Unicode. It can convert Unicode to the job CCSID or convert the job CCSID to Unicode.

The CPP does not need to identify whether the input was provided as Unicode, because the CL run time converts the supplied parameter value to the requested type automatically.

Because of this support, one CL command can support calls to both Unicode and non-Unicode data.

How to specify passing Unicode to the CPP

The Unicode support is an option on the CCSID of value (CCSID) parameter of the Parameter (PARM) command . This value can be specified only when the TYPE parameter value is *CHAR or *PNAME. Following are the possible values for the CCSID parameter:

*JOB
If the command string was originally in Unicode, the value is converted to the job CCSID. If the original command string was not in Unicode, the job CCSID is assumed and no conversion is done.
*UTF16
The parameter value is converted to UTF-16. If the original input was not in Unicode, it is assumed to be in the job CCSID.