Recommendations and guidelines for using CCSIDs

These recommendations are useful when you write globalized applications.

  • Because the system is included with a default CCSID of 65535, character data conversions do not normally occur in applications. You should look over the CCSID information in this topic, however, because the system might need to participate in a multilingual environment, a network, or exchanging data at a later time.
  • Applications implementing their own mapping scheme should use CCSID 65535, where a CCSID assignment is necessary. For example, depending on what an application does, it might need to use CCSID 65535 for the files, or it might need to use CCSID 65535 for the jobs. Because other applications may require CCSIDs other than 65535, consider changing such applications by replacing the mapping scheme with CCSID support.
  • Correctly define fields based on their usage. If fields contain application-dependent values (for example, control characters or fields that are not used as real character fields), define the fields as hexadecimal data or character fields with CCSID 65535.
  • Avoid using characters that are not in the invariant character set for names and literals in programs.

Follow these guidelines when using CCSIDs:

  • Use CCSIDs in multilingual applications to maintain character integrity in database files, displays, and printed data.
  • You can find a suggested CCSID for a language in Language identifiers and associated default CCSIDs.
  • If the QIGC system value is set on, set QCCSID as a mixed CCSID or 65535.
  • If you use DBCS support, set the job CCSID to a mixed CCSID. If you do not, set the job CCSID to a single-byte CCSID.
  • Ensure that the QCHRID code page is compatible with the character set and code page of the QCCSID value, unless the QCCSID value is 65535. If the QCCSID value is changed to a value that is incompatible with the current QCHRID value, the QCHRID value is changed to a compatible value by the system.
  • If you use a user-defined data stream (UDDS), remove any X'3F' values inserted by CCSID conversions. Otherwise, your data can cause the system to blank out a screen. Some CCSID conversions use a X'3F' value for a substitution character.
  • If you are using any interactive jobs, such as Application Development ToolSet/400, ensure that the code page of the job CCSID matches the code page of the keyboard type. If these CCSID values do not match, or the job CCSID is 65535, unpredictable results might occur.
  • Be aware that the *JOBCCSID support is not used by any system-supplied displays or panel groups, although CHRIDCTL support is used.
  • Be aware of character data that has been defined or specified as control information. For new database files, fields that contain control information should be defined as hexadecimal data type or use CCSID 65535 instead of another CCSID.
  • Because of workstation hardware restrictions, you might not see all of the characters on displays other than 3486, 3487, 3488, or Personal System/2 (PS/2) displays when CCSID conversion occurs. However, the character data is retained in the system.
  • Be aware that when a CCSID conversion is performed, substitution characters might cause a loss of data. The situation occurs if enforced subset match conversion is performed.