ADABAS (Adaptable Database System) together with the NATURAL programming language has been a staple of enterprise data processing for decades. While originally designed for Western alphabets, the platform has evolved to meet the needs of global customers, including those that require full Japanese language support. This page explains how Kanji (Chinese characters used in Japanese writing) is handled in ADABAS/NATURAL, covering configuration, data modeling, coding practices, and performance considerations.
Japanese business applications often need to store and display customer names, addresses, product descriptions, and freeform comments in Kanji. Failure to handle these characters correctly can lead to data loss, incorrect sorting, and broken user interfaces. Proper Kanji support ensures:
Since version 9.2, ADABAS can operate in Unicode mode. The essential steps to enable Kanji handling are:
CHARSET parameter to UTF-8 (or UCS-2 for legacy systems) in the ADABAS configuration file (adabasrc).VARCHAR or CHAR with the appropriate byte length. Because a single Kanji can occupy up to three bytes in UTF8, allocate enough bytes to hold the maximum expected characters.ADANET driver that performs automatic conversion between the applications CCSID and the databases CCSID.DEFINE DATALOCAL 1 EMPLOYEE 2 EMP-ID PIC 9(6) 2 EMP-NAME PIC X(30) /* up to 10 Kanji characters (UTF8) */END-DEFINE
The PIC X() clause works the same as for ASCII, but the length is measured in bytes. The example above reserves 30 bytes, enough for ten threebyte Kanji characters plus possible ASCII symbols.
When reading from a terminal (e.g., 3270) or a web interface, NATURAL automatically translates the incoming data to the database CCSID if the sessions CCSID is set to 1208 (UTF8). For file I/O, use the FILE statement with the CHARSET=UTF-8 option.
READ EMPLOYEE BY EMP-ID DISPLAY EMP-NAMEEND-READ.
All display routines must be capable of handling multibyte characters. Modern NATURAL consoles (e.g., Visual NATURAL) and WebNATURAL automatically render Kanji correctly.
Standard string functions (SUBSTR, CONCAT, INDEX) operate on characters, not bytes, when the program runs in Unicode mode. This prevents accidental truncation of a multibyte Kanji character.
ADABAS provides two main indexing options for Kanji fields:
LCID=JA-JP in the index definition.DEFINE INDEX EMP-NAME-IX ON EMPLOYEE USING EMP-NAME LCID=JA-JP TYPE=UEND-DEFINE
Searches that need to respect Hiragana/Katakana equivalence or Kanji radicals should use the collation index.
Many Japanese enterprises integrate ADABAS/NATURAL with ERP, CRM, and web portals. The common integration points are:
ADANET can expose NATURAL services as RESTful endpoints. When defining a service, set CONTENT-TYPE: application/json; charset=utf-8 and ensure that JSON payloads encode Kanji in UTF8.
Messages carrying Kanji must have the JMS_IBM_MQMD.CodedCharSetId set to 1208. The NATURAL program can read and write such messages without additional conversion.
If you need to communicate with older COBOL or PL/I systems that use EBCDIC500 (Japanese), configure ADABAS with CCSID=939 for that connection and let ADABAS perform the conversion.
PIC X(10) field for a Japanese name and assuming it can hold ten characters.103 = 30 bytes (plus a few extra for safety) or use VARCHAR with a larger limit.To verify that your environment handles Kanji correctly, run the following simple test case:
DEFINE DATA LOCAL 1 TEST-REC 2 ID PIC 9(4) 2 NAME PIC X(30) /* Kanji field */END-DEFINE* Insert a record containing KanjiINSERT TEST-REC ID = 1001 NAME = '' /* Yamada Tar */END-INSERT* Retrieve and displayREAD TEST-REC BY ID = 1001 DISPLAY NAMEEND-READ.
If the output shows the characters correctly and the record can be retrieved by its ID, the basic Unicode pipeline is working.
Japanese Kanji support in ADABAS/NATURAL is mature and reliable when the system is configured for Unicode, fields are sized for multibyte data, and appropriate indexes are chosen. By following the guidelines abovesetting the database charset, using Unicodeaware NATURAL code, and leveraging collation indexesyou can build robust Japaneselanguage applications that run at scale and integrate seamlessly with modern services.
