Admin 13 Jun 2026 14:10

 

Japanese Kanji Support in ADABAS/NATURAL

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.

1. Why Kanji Support Matters

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:

  • Accurate storage of multibyte characters.
  • Correct collation and searching according to Japanese linguistic rules.
  • Interoperability with modern frontend technologies (web, mobile, Windows).

2. ADABAS Unicode Foundations

Since version 9.2, ADABAS can operate in Unicode mode. The essential steps to enable Kanji handling are:

  1. Database character set: Set the CHARSET parameter to UTF-8 (or UCS-2 for legacy systems) in the ADABAS configuration file (adabasrc).
  2. Record definitions: Declare fields that may contain Kanji as 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.
  3. Clientside conversion: NATURAL programs must run under a Unicodeaware CICS or TPF region, or use the ADANET driver that performs automatic conversion between the applications CCSID and the databases CCSID.

3. NATURAL Programming with Kanji

3.1 Declaring Kanji Fields

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.

3.2 Input and Output

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.

3.3 String Manipulation

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.

4. Indexing and Searching Kanji

ADABAS provides two main indexing options for Kanji fields:

  • Binary index: Stores the raw byte sequence. Fast but orders characters by byte value, which does not correspond to Japanese collation.
  • Collation index: Uses the ICU library to apply localespecific sorting rules. To create a collation index, specify 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.

5. Interfacing with External Systems

Many Japanese enterprises integrate ADABAS/NATURAL with ERP, CRM, and web portals. The common integration points are:

5.1 ADANET/REST

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.

5.2 MQ Series & JMS

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.

5.3 Legacy Interfaces

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.

6. Performance Tips

  1. Allocate adequate byte length: Overallocating wastes space; underallocating forces truncation. A typical rule of thumb is 3bytes per Kanji plus 1byte for ASCII.
  2. Prefer collation indexes only when needed: They are slower to maintain than binary indexes. Use binary indexes for primary key lookups and collation for userdriven searches.
  3. Batch updates: Sending many small updates from NATURAL can increase CPU usage due to repeated character conversion. Group updates into larger transactions.
  4. Monitor CCSID mismatches: ADABAS logs warnings when a clients CCSID differs from the database CCSID. Resolve these early to avoid hidden conversion overhead.

7. Common Pitfalls and How to Avoid Them

Pitfall: Declaring a PIC X(10) field for a Japanese name and assuming it can hold ten characters.
Solution: Remember that Kanji in UTF8 can use up to three bytes. Reserve at least 103 = 30 bytes (plus a few extra for safety) or use VARCHAR with a larger limit.
Pitfall: Using a binary index for a field that is searched with starts with logic, which returns unexpected ordering for Japanese strings.
Solution: Create a collation index with the correct LCID, or perform the starts with logic in the application after fetching a broader result set.

8. Testing and Validation

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.

9. Resources

  • ADABAS Documentation Unicode and MultiByte Character Support (PDF)
  • NATURAL Language Reference Section Character Handling in Unicode Mode.
  • IBM Knowledge Center CCSID 1208 (UTF8) Overview.
  • ICU User Guide Collation and locales for Japanese.

10. Conclusion

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.

Reference Files For Japanese Kanji Support In ADABAS/NATURAL Systems
Screenshoot
File Name
p003_item_download_2022_09_24_03_30_19.pdf

File Size
0.68 MB

File Type
PDF

File Site
Description
This file is just a reference file for Japanese Kanji Support In ADABAS/NATURAL Systems. Does not guarantee that the specific things you want are included in it.
Direct download (wait 10 seconds)

Japanese Kanji Support In ADABAS/NATURAL Systems and Reference File Download Link


admin
Admin
2026-06-13 14:10:33

Game Based Learning For Japanese Kanji N4 Acquisition and Reference File Download Link


admin
Admin
2026-06-08 19:18:10

The Provided Content Represents A Comprehensive Budget Table For A Canada Council For The...


admin
Admin
2026-06-02 22:26:04

Decision Support Systems And Intelligent Systems and Reference File Download Link


admin
Admin
2026-06-06 12:12:11

Remembering The Kanji (Heisig S RtK) and Reference File Download Link


admin
Admin
2026-06-10 20:00:19