CCSID definition keyword

This keyword sets the CCSID for alphanumeric, graphic, and UCS-2 definitions.

number must be an integer between 0 and 65535. It must be a valid CCSID value.
  • A valid alphanumeric CCSID is 65535, or an EBCDIC CCSID with encoding scheme x'1100' or x'1301', or an ASCII CCSID with encoding scheme X'2100', X'3100', X'4100', X'4105', X'5100', X'2300', X'3300', or the UTF-8 CCSID 1208.
  • A valid graphic CCSID is 65535 or a CCSID with the EBCDIC double-byte encoding scheme (X'1200').
  • A valid UCS-2 CCSID has the UCS-2 encoding scheme (x'7200').

For program-described fields, the CCSID keyword overrides the defaults set on the control specification or the /SET directive with the CCSID(*CHAR), CCSID(*GRAPH), or CCSID(*UCS2) keyword.

Some special values are allowed
*DFT
CCSID(*DFT) indicates that the current default CCSID for the module is to be used. This is useful when the LIKE keyword is used since the new field would otherwise inherit the CCSID of the source field. See /SET for more information about the current default CCSID.
*{NO}EXACT
CCSID(*EXACT) and CCSID(*NOEXACT) are valid for externally-described data structures and data structures defined with the LIKEREC keyword. The CCSID keyword for a data structure controls the CCSID of alphanumeric subfields. See CCSID(*EXACT | *NOEXACT) for more information.
*HEX, or 65535
CCSID(*HEX) is valid for alphanumeric and graphic definitions. It indicates that the data is not considered to have a CCSID. Items defined with CCSID(*HEX) or CCSID(65535) cannot be used in CCSID conversions.
*JOBRUN
CCSID(*JOBRUN) is valid for alphanumeric and graphic definitions. It indicates that the data is is in the job CCSID at runtime.
*JOBRUNMIX
CCSID(*JOBRUNMIX) is valid for alphanumeric definitions. It indicates that the CCSID is the mixed-byte CCSID related to the job CCSID.
*UTF8
CCSID(*UTF8) is valid for alphanumeric definitions. It indicates that the CCSID is 1208, which is the CCSID for UTF-8 Unicode data.
*UTF16
CCSID(*UTF16) is valid for UCS-2 definitions. It indicates that the CCSID is 1200, which is the CCSID for UTF-16 Unicode data.
If the keyword is not specified
  • If a data type is specified, the current default CCSID for the module is assumed. See /SET for more information about the current default CCSID.
  • If the LIKE keyword is specified, the new field will have the same CCSID as the LIKE field.
Note:
  • If this keyword is not specified for a character definition, and neither CCSID(*EXACT) nor CCSID(*CHAR) is specified on a control statement, and CCSID(*CHAR) has not been specified on a /SET statement that is in effect, the CCSID for the character field is the mixed CCSID related to the job CCSID. The mixed CCSID is capable of handling both single-byte character set (SBCS) data and double-byte character set (DBCS) data. For example, if the job CCSID is the single-byte CCSID 37, the mixed CCSID is 937. The characters X'0E' and X'0F' will be interpreted as shift characters. This can lead to incorrect results when this data is converted to another CCSID, if the data happens to contain X'0E' or X'0F', and the job CCSID is not a DBCS-capable CCSID.
  • This keyword is not allowed for graphic definitions when CCSID(*GRAPH : *IGNORE) is specified or assumed.