How an entry in SYSIBM.SYSSTRINGS works with character conversion
The catalog table SYSIBM.SYSSTRINGS contains information about character conversion. Each row in the table describes a conversion from one coded character set to another.
The following columns in SYSSTRINGS are relevant to character conversion.
- INCCSID
- The source CCSID of a character conversion.
- OUTCCSID
- The target CCSID of a character conversion.
- TRANSTYPE
- The type of conversion:
- SS
- SBCS data to SBCS data
- SM
- SBCS data to EBCDIC MIXED data
- MS
- EBCDIC MIXED data to SBCS (EBCDIC and ASCII) data
- PS
- ASCII MIXED data to SBCS (EBCDIC and ASCII) data
- GG
- GRAPHIC data to GRAPHIC data
- PM
- ASCII MIXED data to EBCDIC MIXED data
- MM
- EBCDIC MIXED data to EBCDIC MIXED data
- MP
- EBCDIC MIXED to ASCII MIXED data
- PP
- ASCII MIXED to ASCII MIXED data
- SP
- SBCS (ASCII and EBCDIC) to ASCII MIXED data
- ERRORBYTE
- Specifies the byte that is used in the conversion table (TRANSTAB) as an error indicator. For example, if ERRORBYTE is X'3E', that byte is used in the conversion table to indicate that no conversion is defined for code points that map to X'3E'. Null indicates the absence of an error indicator.
- SUBBYTE
- Specifies the byte that is used in the conversion table (TRANSTAB) as a substitution character. For example, if SUBBYTE is X'3F', that byte is used in the conversion table as a substitute for code points that map to X'3F'. A warning occurs when a code point maps to the value of SUBBYTE. Null indicates the absence of a substitution character.
- TRANSPROC
- The name of a module or a blank string. If IBMREQD is N, a non-blank value of TRANSPROC is the name of a user-provided conversion procedure. If IBMREQD is Y, a non-blank value of TRANSPROC is the name of a Db2 module that contains DBCS conversion tables.
- IBMREQD
- Y indicates that the row is provided by IBM®. N indicates that the row has been inserted by the user.
- TRANSTAB
- A 256-byte conversion table or an empty string.
Each row of SYSSTRINGS contains information about the conversion of character strings from the coded character set that is identified by INCCSID to the coded character set that is identified by OUTCCSID. The conversion function is automatically invoked when a conversion from the coded character set that is identified by the INCCSID column to the coded character set that is identified by the OUTCCSID column is required.
For example, the row of SYSSTRINGS in which the value of INCCSID is 500 and the value of OUTCCSID is 37 describes the conversion from CCSID 500 to CCSID 37. The row in which the value of INCCSID is 37 and the value of OUTCCSID is 500 describes the conversion from CCSID 37 to CCSID 500.
- Rows with IBMREQD=Y cannot be updated or deleted.
- Rows with IBMREQD=N can be inserted, updated, and deleted.
- The same pair of CCSIDs can be in two rows, if one is in an IBM-supplied row and the other is in a user-provided row. In this case, the user-provided row is used for the character conversion.
The following table lists the types of rows that are possible in SYSSTRINGS.
The value of TRANSPROC is | The value of TRANSTAB is | The value of IBMREQD is | The result is |
---|---|---|---|
blank | an empty string | – | No conversion is performed. |
not blank | – | NO | Conversion is performed by the conversion procedure module name identified in the TRANSPROC column |
blank | not empty | – | Conversion is performed by the Db2 module using the conversion table identified in TRANSTAB |
Be aware of the following rules for SYSSTRINGS entries:
- An INSERT, UPDATE, DELETE, or LOAD is allowed only if IBMREQD=N.
- The values in the INCCSID and OUTCCSID columns must be in the range 1–65533.
- For any given row, the INCCSID and OUTCCSID columns cannot contain the same value.
- The value in the TRANSTYPE column must be SS, SM, MS, PS, MM, PM, GG, MP, PP, or SP.
- For any given row, the ERRORBYTE and SUBBYTE columns cannot contain the same nonnull value.
- The TRANSPROC column must either be blank or contain a string that conforms to the rules for z/OS® program names.
- The length that is specified in the TRANSTAB column must be either 0 or 256.