Determining Which UI is Running

To determine whether the user interface to your program is running through the Windows run-time, or the thin client, you can add ACCEPT TERMINAL-ABILITIES FROM TERMINAL-INFO to your program. (TERMINAL-ABILITIES is defined in the sample/def/acucobol.def copybook.) The TERMINAL-NAME field that is returned contains a short descriptive name of the terminal type being used. If the Windows run-time or thin client is being used, the TERMINAL-NAME contains the string Windows.

If you are maintaining separate screen sections for these environments, this could be useful for determining which screen section or routine to use at any given moment. For example, you might include the following code in your program:

     If terminal-name = Windows
     display screen1a

terminal-name is defined as an 03 data-item under the 01 TERMINAL-ABILITIES.

The IS-REMOTE field is set to true if the program is running with thin client. When IS-REMOTE is true, CLIENT-MACHINE-NAME is set to the name of the client that is running thin client, plus a hyphen (-) and the hex value of the client process ID. For example: