Code Page Support

#### Search Results

Search

# Code Page Support

In heterogeneous client/server architectures, where the client and servers reside on machines with different architectures, Adabas supports a method whereby the client nodes that require different character sets (also called code pages) are provided with the appropriate translation tables for the conversions. An example of this would be an Adabas nucleus running on a Linux machine, with one application running on a mainframe (EBCDIC code) and another application running on a language-sensitive PC; in this case, the nucleus would require 2 translation tables in order to handle the data from both applications correctly.

Code page support is available for:

- ADANUC (ADABAS nucleus)

- ADACMP (compression utility)

- ADADCU (decompression utility)

Adabas supports the use of plain text files as private code pages. In addition to this, DLLs or shared libraries can be used (see Code Page User Exit below for further details). The translation text file to be used is attached to Adabas with the environment variable ADATRT, but the file must have the extension `.txt` (or `.TXT`), for example:

    ADATRT = trt.dll		# use code pages with built dll
    ADATRT = trt.txt		# use code pages with text file

The syntax of such a text file is as follows:

- Characters and names are not case sensitive.

- A table declaration must start with the code name, either ASCII or EBCDIC. The ASCII table can be used for remote ASCII clients running on a different code page, the EBCDIC table can be used for mainframe clients. One ASCII and/or EBCDIC table may be translated with the text file.

- The character pairs to be translated are specified in hexadecimal notation, separated by a comma. The first character specifies the client value, the second specifies the (ASCII) value on the server side. Only one pair per line is permittted.

- Only the characters that are different need to be supplied, e.g. the translation from EBCDIC "A" to ASCII "A" can be omitted.

- Empty lines are permitted and comments can be made starting with a semicolon.

The following is an example of how to define a private EBCDIC translation file:

    trt.txt:
    	EBCDIC
    	4A,C4    ; translate EBCDIC Ae (0x4A) to ASCII C4
    	E0,D6    ; translate EBCDIC Oe (0xE0) to ASCII D6

Note
The use of text files and shared libraries is mutually exclusive.