Creating a custom character table

To create a custom character table, create a definition card for custom character table creation and use the Custom Character Table Registration program (XRECTBL).

Program Name

XRECTBL

Execution parameters (for EXEC statement)

SOURCE=XXXXXXXX, OBJIN=XXXXXXXX, OBJOUT=XXXXXXXX

SOURCE

Source DD name

Define the source DD name for the assembler program. When not defined, this parameter defaults to 'SYSIN.'

OBJIN

Object program input DD name

Define the object program input DD name for the assembler program. When not defined, this parameter defaults to 'SYSLIN.'

OBJOUT

Object program output DD name

Define the object program output DD name for the assembler program. When not defined, this parameter defaults to 'SYSLIN.'

XRSYSIN Definition Card

Format of definition card

OPLSELECT=Operation Log Output Option (*1)

*1

:

When you use the operation log output function, you must include definitions related to operation logs. For details, refer to the following:

HULFT10 for zOS Operation Manual : Operation log control

XRCRD Definition Card

The definition card format for creating a custom character table is explained below.

An XRCRD definition card can contain definitions of multiple custom character tables.

[Specification of custom character table name]

Specify the appropriate custom character table from the custom character table list in Table 3.13 for the character codes from which and to which conversion is carried out.

Custom Character Table Name

Table 3.13 List of Custom Character Tables

Input Code

Output Code

Custom Character
Table Name

Default Value
When Undefined

IBM Kanji

Shift-JIS

ITSTBL

X'81A0'

IBM Kanji

EUC-JP

ITETBL

X'A2A2'

IBM Kanji

JEF

ITJTBL

X'A2A2'

IBM Kanji

UTF-8

ITU8TBL

X'E296A1'

Shift-JIS

IBM Kanji

STITBL

X'44E9'

EUC-JP

IBM Kanji

ETITBL

X'44E9'

JEF

IBM Kanji

JTITBL

X'44E9'

UTF-8

IBM Kanji

U8TITBL (*1)

X'44E9'

*1

:

If you specify U8TITBL for the custom character table name, HULFT creates the custom character tables U8TITBL and U8TITBL2.

[Specification of default code]

Specify the default code used for conversion of custom characters that are not defined in the custom character table.

When a default code is specified, HULFT converts custom character codes that are not defined in the custom character table to the default code.

[DEFAULT XXXX]

[Specification of conversion information]

Specify the codes before and after conversion as character codes represented by 4-digit hexadecimal numbers (X'xxxx').

XXXX(Code before conversion)  XXXX(Code after conversion)

= Remarks =
  • When the code before conversion or after conversion is EUC-JP, you can specify 6-digit hexadecimal codes.

  • When the code before conversion is UTF-8, you can specify 4- to 8-digit hexadecimal codes.

  • When the code after conversion is UTF-8, you can specify 2- to 8-digit hexadecimal codes.

[Specification of definition end statement]

Specify the statement below at the end of a custom character table definition.

END

Note
  • A custom character table name must be defined before the table content.

  • Separate each custom character table definition with END.

  • The maximum number of characters for a definition is 65535. If a definition contains 65536 characters or more, proper operation is not guaranteed.

  • If a custom character table contains duplicate definitions for a code, the last definition is valid.

    However, when either the input code or the output code is EUC-JP, the first definition is valid.

  • Items enclosed with [] are optional.

  • Default code specification must come immediately after the custom character table name.

  • Custom character tables are overwritten when updated. To register additional custom characters, specify again the already-registered custom characters on the XRCRD definition card as well.

  • The following codes are not supported as the code before conversion or as the code after conversion:

    X'FF', X'FFFF', X'FFFFFF', X'FFFFFFFF'

  • When registering a table that defines custom character conversion from UTF-8 to IBM Kanji (U8TITBL), do not specify codes on the XRCRD definition card that do not exist in the UTF-8 code system (encoding code scheme).

  • If an XRCRD definition card contains duplicate definitions of custom character tables, the last custom character table definition is valid.

  • When registering a table that defines custom character conversion from EUC-JP to IBM Kanji (ETITBL), do not specify codes on the XRCRD definition card that do not exist in the EUC-JP code system (encoding code scheme).

Example of JCL

An example of JCL used to create a custom character table is given below.

This example shows how to create a custom character table that converts '' (IBM Kanji: 0x446D, Shift-JIS: 0x878A) in conversion from IBM Kanji to Shift-JIS.

//XRECTBL  JOB  CLASS=A,MSGCLASS=B                                              
//XRECTBL  EXEC PGM=XRECTBL,REGION=1024K                                        
//STEPLIB  DD   DSN=HULFT.LOAD,DISP=SHR                                         
//XRSYSIN  DD   DSN=HULFT.PARMLIB(HULPRM),DISP=SHR                              
//SYSLMOD  DD   DSN=HULFT.LOAD,DISP=SHR                                         
//SYSIN    DD   DSN=&&OBJECT,DISP=(,PASS,DELETE),UNIT=SYSDA,                    
//             SPACE=(CYL,(010))                                                
//SYSLIB   DD   DSN=SYS1.MACLIB,DISP=SHR                                        
//SYSUT1   DD   UNIT=SYSDA,SPACE=(CYL,(10))                                     
//SYSUT2   DD   UNIT=SYSDA,SPACE=(CYL,(10))                                     
//SYSUT3   DD   UNIT=SYSDA,SPACE=(CYL,(10))                                     
//SYSLIN   DD   DSN=&&OBJECT2,DISP=(,PASS,DELETE),UNIT=SYSDA,                   
//             SPACE=(CYL,(010))                                                
//SORTWK01 DD   UNIT=SYSDA,SPACE=(CYL,(10))                                     
//SYSOUT   DD   SYSOUT=*                                                        
//SYSPRINT DD   SYSOUT=*                                                        
//XRCRD    DD   *                                                               
ITSTBL                                                                          
DEFAULT  81A0                                                                   
446D     878A                                                                   
END                                                                             
/*                                                                              
//                                                                              

DD Name

Value

Description

STEPLIB

HULFT.LOAD

HULFT load module library

XRSYSIN

HULFT.PARMLIB(HULPRM)

System Environment Settings File

SYSLMOD

HULFT.LOAD

HULFT load module library

Parameter Name

Value

Description

UNIT

SYSDA

UNIT

Note

If a data overflow occurs in HULFT load module library during creation of a custom character table, the custom character table is not created successfully. Check the capacity of HULFT load module library before executing the Custom Character Table Registration program (XRECTBL).