Step One: Terminal Identification

The ACUCOBOL-GT runtime system 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 Windows, typically do not use a terminal database file. Check with your Product Support representative if your terminal is non-standard, to determine if you require the terminal database file.)

The runtime system first looks for the system variable A_TERMCAP; if that variable is present, the runtime system opens the file named in it as the terminal database file. If the system variable A_TERMCAP is not present, the runtime system 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
UNIX /etc/a_termcap

You must tell the Terminal Manager what terminal database file to use with your ACUCOBOL-GT application. Either:

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. If neither TERM nor A_TERM is present, the Terminal Manager terminates the runtime system with an error message. See Step 2 Creating a Configuration File for exceptions.

The various operating systems handle TERM and A_TERM in different ways:

The terminal database file shipped with the ACUCOBOL-GT runtime system 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.