If you specify SRVERCP=USR or USRD in a DFHCNV TYPE=ENTRY macro, you must provide user-defined conversion tables. The standard conversion program (DFHCCNV) uses these tables, and they are made available to the user-replaceable conversion program, DFHUCNV.
Place your user-defined conversion tables in the DFHCNV macro source, anywhere after the DFHCNV TYPE=INITIAL macro. For source readability, the best place is probably after the DFHCNV TYPE=FINAL macro.
The following are descriptions of the types of table you may need to define and the way to label each type.
You must provide two character conversion tables, labelled ASTOEB and EBTOAS. Each table must be 256 bytes long. ASTOEB is used for ASCII to EBCDIC conversion and EBTOAS is used for EBCDIC to ASCII conversion. The hexadecimal value of a character byte is used as an offset in the conversion table to obtain the converted value of the character. Figure 15 illustrates this process.
You must provide DBCS character conversion tables labelled DBASTOEB and DBEBTOAS, in the DFHCNV source. These must be after the DFHCNV TYPE=INITIAL macro, but otherwise anywhere in the source. Each table must be a list of 256 four-byte pointers and 256 pairs of 256-byte translate tables. The first byte of a DBCS character is used as an index to the list of pointers. Using the first byte of the DBCS character as a hexadecimal offset in the list, the pointer found is the address of a pair of 256-byte translate tables. The second byte of the DBCS character is used as an offset in each of the two 256-byte translate tables to obtain the first and second bytes of the converted DBCS character. Figure 16 illustrates this process.
You must also provide an SBCS conversion table as specified under USR above.
In ASCII and EBCDIC, certain code ranges are valid DBCS code. Any double-byte value outside these ranges is an invalid DBCS character. In the supplied conversion tables, invalid DBCS characters convert to X'FFFF', as defined by the code page architecture.
Within the valid code range, several thousand double-byte values are defined as actual DBCS characters. A double-byte value within the valid code range, but not defined as a DBCS character, is an undefined DBCS character.
User-defined tables should follow the above conventions for invalid and undefined characters.