ContentsIndexPreviousNext

4.2.1 Step One-Terminal Identification

The ACUCOBOL-GT runtime opens the terminal database file. Each entry in the file consists of the name of a terminal, followed by its screen and keyboard attributes, definitions and codes. (Runtimes for some systems, such as DOS, Windows, and Windows NT, typically do not use a terminal database file. Check with your Acucorp Customer Service representative if your terminal is non-standard, to determine if you require the 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

You must tell the Terminal Manager what terminal database file 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 (this approach works fine in most cases),

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 what 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. Setting TERM to the correct terminal name will handle most situations; see section 4.2.2 in this chapter for exceptions. If neither TERM nor A_TERM is present, the Terminal Manager terminates the runtime with an error message.

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 will use with your ACUCOBOL-GT application, then nothing more need be done.