Terminal Translation

 

When the remote and host terminals are identical, the remote terminal is capable of performing every task, which the host terminal performs. If the two terminals are different, terminal translation has to be done. AdventNet CLI API provides XML driven translation tables for translating terminal data.

 

In general, the IBM host systems use a data format called EBCDIC (Extended Binary Coded Decimal Interchange Code). This defines the value of all alphanumeric and other characters in a byte. On the other hand, all other PCs use the ASCII format (American Standard Code for Information Interchange) to interpret data bytes. Therefore, PCs must translate the host data from EBCDIC to ASCII in order to display it properly and also translate the input ASCII data to EBCDIC to send data to the host.

 

The table given below is a list of parameters grouped under the TRANSLATION_TABLE tag, with a brief description, which can be used for terminal translation.

 

Tag Description

TRANSLATION-TABLE

It contains the list of TABLEs identified by their names and has VERSION attribute

TABLE

It contains the list of translation codes, which have the following attributes:

  • NAME: identifies a particular table.

  • TYPE: specifies the way in which the codes can be interpreted, i.e., in alphanumeric (alpha), or byte value in hex (byteHex), or byte value in decimal (byteDec).

TRANSLATE

It contains the actual codes to be translated. It has the following attributes:

  • CODE: contains a actual list of codes.

  • VALUE: contains a list of codes to which the codes in the CODE attribute is to be translated.

  • TYPE: specifies the way in which the codes can be interpreted, i.e., in alphanumeric (alpha), or byte value in hex (byteHex), or byte value in decimal (byteDec).

 

For complete details, please refer to TranslationTable.dtd available in <CLI Home>/conf directory.

 

The following example explains the translation of terminal codes from ASCII to Extended Binary Coded Decimal Interchange Code.

 

<TRANSLATION-TABLE VERSION="1.0">

<TABLE NAME="ASCII2EBCDIC" TYPE="byteDec">

<TRANSLATION CODE="32" VALUE="64"/>

<TRANSLATION CODE="33" VALUE="90"/>

<TRANSLATION CODE="34" VALUE="127"/>

</TABLE>

</TRANSLATION-TABLE>

 

This table can be used to translate a code from ASCII to EBCDIC.