Technical data

EBCDIC/DMCS Translation Tables
B.1 Macros for Modifying the Translation Tables
In this example, the macro changes the EBCDIC-to-DMCS translation
table so that the EBCDIC character represented by the hexadecimal code
4A translates to a DMCS cent sign (hexadecimal code A2.) The DMCS-
to-EBCDIC translation table is also changed so that a DMCS cent sign
translates to the EBCDIC character represented by the hexadecimal code 4A.
NOTE
If you use the REVTRA macro, you must give new translations to the
codes used as arguments to the macro. You can do this with the EB2AS
and AS2EB macros.
B.2 Building Translation Tables
Before you edit the file TN3270DEF.MAR, save the original by copying it from
TCPIP$EXAMPLES to your current default directory. Edit the file in your own
directory.
Edit the file using any editor your system supports. When you have changed the
file to your satisfaction, perform the following steps:
1. Assemble the file you just edited:
$ MACRO/OBJECT TN3270DEF
When you assemble the template file, you create an object file containing two
256-byte translation tables labeled $AS2EB:: and $EB2AS::. This object file
can be linked to a user application program.
2. Link the new file to create the translation table, enter:
$ LINK/SYSTEM/HEADER TN3270DEF
3. Copy the resulting image to the system library. Enter:
$ COPY TN3270DEF.EXE SYS$LIBRARY:TN3270DEF.TBL
The .EXE file is renamed to .TBL in this final step.
B.3 Examples of Modifying Translation Tables
This section gives two examples of modifying translation tables. Example 1
shows how to translate the ASCII left bracket to the EBCDIC cent sign. Example
2 shows how to modify the standard translation tables to the translation tables
used by the TN3270 Terminal Emulator.
1. The following code segment translates the ASCII left bracket, hexadecimal
code 5B, to the EBCDIC cent sign, hexadecimal code 4A. The change causes
the EBCDIC cent sign to be translated into the ASCII cent sign, hexadecimal
A2. When the REVTRA macro is used, it leaves the ASCII left bracket
unmapped, and a second macro, AS2EB, is used to map the ASCII left
bracket to the EBCDIC SUB character, hexadecimal 3F.
DMFILL = 26. ; This argument causes all the EBCDIC
; characters that normally map to an ASCII
; backslash in the standard table to map
; to an ASCII SUB character, code 26
; decimal, 1A hexadecimal.
B–2 EBCDIC/DMCS Translation Tables