Compaq TCP/IP Services for OpenVMS
Management


Previous Contents Index

A.20 For More Information

For more information about configuring GATED routing, visit the GATED Consortium web page:


www.gated.org 


Appendix B
EBCDIC/DMCS Translation Tables

The TCP/IP Services TELNET implementation supports IBM 3270 terminal emulation. The default translation tables satisfy most users' needs.

B.1 Macros for Modifying the Translation Tables

If the standard translation table does not suit your needs, you can modify it by specifying macros in the file TN3270DEF.MAR. You should copy TN3270DEF.MAR from TCPIP$EXAMPLES into your current default directory and edit it with any editor supported by your system.

Use the macros described to make any changes you need in the translation tables. You can specify three macros. The arguments for all three macros are:
eb The EBCDIC code for the character you want to translate.
as The DMCS code for the character you are translating to. (You can specify the actual DMCS display character instead of the code, if you want to. To do this, enter a single quotation mark before you type the character, for example, '!, 'A, 'g, and so on.)

The macros are:

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. 
     
    REVTRA  4A,A2           ; Map the EBCDIC cent character (4A) 
                            ; to/from the ASCII cent character (A2). 
                                    
    AS2EB   5B,3F           ; Map the ASCII "[" (5B) to the EBCDIC 
                            ; SUB character (3F). 
     
    

    The preceding macro could also be written in the following way:


    AS2EB '[,3F 
    

  2. The following example shows the macros used to modify the standard translation tables to the translation tables used by IBM 3270TE.


    DMFILL  = 26. 
     
    REVTRA  4A,A2           ; Map the EBCDIC cent character (4A) 
                            ; to the ASCII cent character (A2). 
                            ; Because this macro leaves ASCII "[" (5B) 
                            ; still mapped to the EBCDIC cent character 
                            ; (4A), it must be remapped. 
            
    REVTRA  4F,7C           ; Map the EBCDIC "|" (4F) to/from 
                            ; the ASCII "|" (7C). 
     
    REVTRA  6A,A1           ; Map EBCDIC "dashed vbar" (6A) to/from ASCII 
                            ; inverted ! (A1). 
     
    REVTRA  5A,'!           ; Map EBCDIC "!" (5A) to/from ASCII "!" (21). 
     
    AS2EB   '],3F           ; Map ASCII "]" (5D) to the EBCDIC SUB 
                            ; character (3F). 
     
    AS2EB   5B,3F           ; Map the ASCII "[" (5B) to the EBCDIC 
                            ; SUB character (3F). 
    

The changes that are described modify a version of the ANSI standard X3.26 1970 EBCDIC-to-ASCII translation table. Table B-1 shows these modifications:

Table B-1 Modifications to Translation Tables
DMCS Character Hexadecimal Code EBCDIC Character Hexadecimal Code
¢ A2 ¢ 4A
| 7C | 4F
! 21 ! 5A
¡ 1 A1 dashed vbar 6A
[ 5B 2
] 5D 2


1The display of these characters depends on the type of terminal.
2These characters translate to the EBCDIC SUB character, which has an EBCDIC code of 63 decimal (3F hexadecimal).

The DMCS contains 256 characters. The first 128 characters are the same as the standard ASCII character set. None of the remaining characters map to a printable EBCDIC character; therefore, they translate to the EBCDIC SUB character.


Appendix C
How NFS Converts File Names

The NFS to OpenVMS file name translation rules in Table C-1 are based on the character mapping scheme in Table C-2. The OpenVMS to NFS mapping rules are the converse of these rules.

Table C-1 NFS Server to OpenVMS Client File Name Conversion Rules
Rule What Happens to File Names from NFS to OpenVMS
1 Lowercase characters become uppercase (unless Rule 2 applies). For example, file becomes FILE.;1
2 Initial uppercase characters or a sequence of case-shifted characters are prefixed with the "$" escape character. For example, CaseShiftedFile becomes $C$ASE$S$HIFTED$F$ILE.;1
3 A file without a version gets a version number preceded by a semicolon. For example, file becomes FILE.;1
4 If a file name does not include a dot (.), a dot is added before the version number semicolon. For example, file becomes FILE.;1
5 After its name is converted, a file will not appear in an OpenVMS directory listing if any one of the following criteria are met:
  • The file name is more than 39 characters long.
  • The file extension is more than 39 characters long.
  • The version number is greater than 32767.
6 If the file name has a dot, the dot is preserved unless the resulting file name fails one of the tests in Rule 5; if so, the dot becomes "$5N" and the same rule applies to each subsequent dot found. For example, more.file.text becomes MORE.FILE$5NTEXT;1
7 If the file name is a directory, each dot becomes "$5N" and the file name gets the ".DIR" extension. For example, dot.directory.list becomes DOT$5NDIRECTORY$5NLIST.DIR;1
8 Invalid OpenVMS characters become the escape character sequences in the second column of Table C-2 ("$" followed by a digit and a letter). For example, special#character&file becomes SPECIAL$5CCHARACTER$5FFILE.;1 ("#" becomes "$5C" and "&" becomes "$5F")
9 Any existing "$" becomes "$$" (plus any "$" added due to Rule 2 or 8 above). For example, dollar$Sign$5cfile becomes DOLLAR$$$S$IGN$$5CFILE.;1

Table C-2 provides a complete list of OpenVMS character sequences, corresponding server characters, and octal values used for NFS name conversion.

Table C-2 NFS Client Name Conversion
OpenVMS Character Sequence Server Character Octal Value
$6A <CTRL/@> 000
$4A <CTRL/A> 001
$4B <CTRL/B> 002
$4C <CTRL/C> 003
$4D <CTRL/D> 004
$4E <CTRL/E> 005
$4F <CTRL/F> 006
$4G <CTRL/G> 007
$4H <CTRL/H> 010
$4I <CTRL/I> 011
$4J <CTRL/J> 012
$4K <CTRL/K> 013
$4L <CTRL/L> 014
$4M <CTRL/M> 015
$4N <CTRL/N> 016
$4O <CTRL/O> 017
$4P <CTRL/P> 020
$4Q <CTRL/Q> 021
$4R <CTRL/R> 022
$4S <CTRL/S> 023
$4T <CTRL/T> 024
$4U <CTRL/U> 025
$4V <CTRL/V> 026
$4X <CTRL/W> 027
$4X <CTRL/X> 030
$4Y <CTRL/Y> 031
$4Z <CTRL/Z> 032
$6B <CTRL/[> 033
$6C <CTRL/\>> 034
$6D <CTRL/]> 035
$6E <CTRL/^> 036
$6F <CTRL/_> 037
$7A <SPACE> 040
$5A ! 041
$5B " 042
$5C # 043
$5E % 045
$5F & 046
$5G ' 047
$5H ( 050
$5I ) 051
$5J * 052
$5K + 053
$5L , 054
$5N . 056
i$5O / 057
$5Z : 072
$7B ; 073
$7C < 074
$7D = 075
$7E > 076
$7F ? 077
$8A @ 100
$8B [ 133
$8C \ 134
$8D ] 135
$8E ^ 136
$9A ` 140
$9B { 172
$9C | 174
$9D } 175
$9E ~ 176
$9F <DEL> 177


Previous Next Contents Index