ContentsIndexPreviousNext

Terminal Identification and Definition

The ACUCOBOL-GT runtime opens the terminal database file. Each entry in the file consists of the name of a terminal, and its screen and keyboard attributes, definitions, and codes. (Runtimes for some systems, such as Extended DOS, Windows, and Windows NT, do not use a terminal database file.)

The runtime first looks for the system variable A_TERMCAP; if that variable is present, the runtime opens the file named in it as the terminal database file. If the system variable A_TERMCAP is not present, the runtime opens the file name shown in the table below. The file name varies with the operating system (note that file names on UNIX systems are case-sensitive):

System Terminal database file
OS/2 \etc\A_TERMCA
UNIX /etc/a_termcap
MPE/iX /etc/a_termcap
VMS SYS$LIBRARY:A_TERMS.DAT

So you must choose the terminal database file you want to use with your ACUCOBOL-GT application. Either:

a) use the path and name specified in the table above, and do not set A_TERMCAP,

OR

b) use a path and name of your choosing, and specify that path and name in A_TERMCAP.

After the terminal database file is opened, the Terminal Manager needs to know which terminal type is to be used, and where to locate the entry that describes it. One of the system variables A_TERM or TERM holds the name of the entry that is to be used.

The Terminal Manager looks first for the variable A_TERM. If it is present, the Terminal Manager searches the terminal database file for the terminal named in A_TERM. If A_TERM is not present, the Terminal Manager looks for the variable TERM and then searches the terminal database file for the terminal named in TERM. If neither TERM nor A_TERM is present, the Terminal Manager terminates the runtime. The various operating systems handle TERM and A_TERM in different ways:

The terminal database file shipped with the ACUCOBOL-GT runtime contains definitions of the characteristics of most popular terminals; you will probably find yours listed. If the entry named in A_TERM or TERM describes the terminal you want to use with your ACUCOBOL-GT application, then nothing more needs to be done.

If the terminal database file entry named in TERM does not describe the terminal you want to use, you probably won't want to change the value of TERM, because other software may rely on that value. Instead, take these two steps:

1. Locate the terminal database file entry which correctly describes your terminal, or create a new one and give it a new name (see The Terminal Database File section later in this chapter for details).

2. Set A_TERM to the name of that entry.

More:

DOS Special Considerations