


The action of ACUCOBOL-GT on a terminal with "non-hidden" attributes is determined by the setting of the RESTRICTED-VIDEO-MODE runtime configuration variable. This variable can take several different settings to control the rules ACUCOBOL-GT uses for these terminals.
By default, the RESTRICTED-VIDEO-MODE value is zero, which causes the Terminal Manager to ignore attributes other than intensity; the application will run correctly, but without any video attributes. This is convenient when you are running a program that has not been written to conform to the following rules.
To use video attributes with these terminals, you must set RESTRICTED-VIDEO-MODE to a non-zero value; the syntax is:
RESTRICTED-VIDEO-MODE value
Optional values are:
1 - When the variable is set to "1", the Terminal Manager uses rules that tend to emphasize getting the fields in the right location over getting all the attributes correct. These rules are as follows:
a. Every ACCEPT and DISPLAY is preceded by the appropriate attribute-setting character.
b. This character is placed immediately to the left of the beginning of the field. Note that this may overwrite existing data.
c. If the field position is column 1 of the current window, and the attribute is normal white on black, then the attribute-setting character is not displayed.
d. If the field position is column 1 of the current window, and the attribute is other than white on black, the field is moved over to column 2 to allow space for the attribute character.
e. The field is then accepted or displayed using the normal rules.
f. If the screen location immediately after the end of the field does not contain an attribute-setting character, a normal white-on-black attribute character is placed there. If this statement is an ACCEPT statement, this is done before the ACCEPT occurs. The current cursor location is then set according to the normal ACUCOBOL-GT rules (this will cause the cursor location to be where this terminating attribute character is located).
3 - When RESTRICTED-VIDEO-MODE is set to "3", the Terminal Manager follows all the rules listed under value "1" except for rule (c). This causes all ACCEPT and DISPLAY statements that reference column 1 to be placed in column 2. This setting prevents you from placing data in column 1, but causes all fields placed in column 1 to line up vertically regardless of which attributes they use.
5 - When RESTRICTED-VIDEO-MODE is set to "5", the Terminal Manager follows all the rules listed under "1" except for rule (b). The attribute character is placed in the first position of the field, and the field is moved to the right one character. This setting will cause all fields to shift to the right by one, but will not overwrite data if two fields are adjacent.
7 - When RESTRICTED-VIDEO-MODE is set to "7", the Terminal Manager follows all the rules listed for "1" except for rules (b) and (c). Thus, every ACCEPT and DISPLAY will always be preceded by an attribute character, and this character will always occupy the first field position. This value emphasizes getting the attributes correct over getting the fields in the correct screen location.
These rules give a certain amount of flexibility, but also have restrictions. These are discussed in the next section.
4.5.1.1 Restrictions
The following restrictions apply to programs that plan to use "non-hidden attribute" terminals. The restrictions are largely based on physical attributes of these terminals. In essence, by setting RESTRICTED-VIDEO-MODE to a non-zero value, you are declaring to ACUCOBOL-GT that you are willing to work with some restrictions beyond those imposed by other types of terminals. The end user should be aware that moving an application to this type of terminal from a "normal" type may result in unexpected effects.
The following restrictions apply:
1. Under the current version of ACUCOBOL-GT, this style of attribute handling may be applied only at the field and Screen Section levels. If you are using one of these types of terminals, the REVERSED and COLOR phrases of the DISPLAY WINDOW, DISPLAY LINE, and DISPLAY BOX verbs will be ignored.
2. The Terminal Manager makes no attempt to control the screen attributes present when a window is created. If you create a pop-up window over one-half of a reverse-video field, and then you clear that window, the reverse-video field will suddenly extend across the screen when the terminating attribute character is erased. You should keep fields either wholly contained in a window or wholly outside a window.
3. The various RESTRICTED-VIDEO-MODE settings can interact with SCROLL and WRAP settings in unexpected ways. For example, if you have a field wrap-around, the video attribute used for that field will also wrap around for some terminals, but not for others. On the other hand, if you set WRAP to zero and cause a field to be truncated, then the terminating attribute character will not be placed on the screen, and the video attribute may wrap around to the next line on some terminals. Care should be taken with fields that wrap around or scroll the screen.
4. If you position one field within another, you will affect the attributes of the characters that follow the contained field. Keep your fields separate from each other and supply enough space between fields to hold the attribute characters.
These restrictions are relatively easy to work with until you start working extensively with windows. When working with windows, try to keep the use of attributes to a minimum (particularly reverse-video) in order to avoid difficulties. You can use high and low intensity or boxes to organize your screen. Just use reverse-video for special highlighting.
If you intend to use video attributes on these types of terminals, then you should make sure that you fully test your programs on one of them.