Terminal Manager Restrictions

Because of the windowing capabilities of the Terminal Manager, the programmer must abide by certain restrictions. This topic describes these restrictions and how to work with them.

The primary restriction is that the Terminal Manager must retain control of the terminal. It needs to do this in order to implement the windowing functions. Also, by doing this, it can significantly improve screen performance over a dumb screen interface.

The main effect of this restriction is that you may not send arbitrary escape sequences to the terminal. Sending "escape" sequences that command the terminal in a hardware-specific fashion will confuse the Terminal Manager because it will not know what effect the "escape" sequence had on the screen. This will result in the Terminal Manager's making incorrect assumptions about the screen and, eventually, will cause it to display incorrect data.

This restriction is not too serious, however, because the Terminal Manager can perform most functions that are normally accomplished through these escape sequences. Using the Terminal Manager to perform these functions has the added benefit of making them terminal-independent. This allows you to run the same application on any kind of terminal without having to keep a database of terminal capabilities maintained by the program.

The following points outline the Terminal Manager's solution to various functions that are usually implemented via "escape" sequences.

Line Drawing Many programs draw special-forms on the user's screen using the terminal's line drawing characters. This works fine if the line drawing characters are part of the terminal's default character set (such as on a PC), but does not work if you need to send an "escape" sequence to switch character sets.

With ACUCOBOL-GT, you can use DISPLAY BAR, DISPLAY LINE, and DISPLAY BOX to perform line drawing. These verbs have the advantage that you can simply draw the form using screen coordinates without having to worry about different character sets on different terminals or using special characters to handle the intersections.

132-Column Handling Some programs send escape sequences to switch between 80-column and 132-column mode on the terminal. This can be accomplished with the DISPLAY SCREEN verb in ACUCOBOL-GT.
Attached Devices ACUCOBOL-GT can send data to a device attached to the terminal. For example, a printer or a cash register might be attached. The built-in library routine C$LOCALPRINT can send data to the attached device with a variety of line spacing options. This routine is described in Appendix I. Library Routines.
Scrolling ACUCOBOL-GT directly supports scrolling with the SCROLL option of the DISPLAY verb.
Function Key Labels you can program function key labels by providing the appropriate command string in the is entry in a_termcap. See Initialization for more information. Currently, ACUCOBOL-GT does not provide a way to program function key labels at run time.