Pathway/iTS TCP and Terminal Programming Guide

Programming for Specific Terminals
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
3-5
Using Extended Field Attributes
Use the mnemonic names in either the Screen Section or the Procedure Division of
the program unit to refer to the color, highlight, or outline display attributes. For
example:
MNEMONIC-NAME-1 IS RED.
When the program unit is run, the TCP determines which extended field attributes
are supported by the terminal.
The TCP uses only the extended field attributes that the terminal supports.
If, for example, your SCREEN COBOL program unit uses color display attributes
that are available on an IBM 3279 color terminal, but the program unit is run on an
IBM 3278 terminal that does not support color display attributes:
The TCP ignores the color display attributes used in the program unit.
The screen appears correctly on the terminal, but without color.
You can use the optional SET MINIMUM-COLOR and SET MINIMUM-ATTR
statements in the Procedure Division if you must establish the minimum level of
support for color, highlight, and outline display attributes for that program unit and
all other program units called by that program unit. The TCP uses the information
provided by the SET MINIMUM-COLOR and SET MINIMUM-ATTR statements
to determine the level of support for color, highlight, and outline display attributes
required by a program unit.
For example, if your program unit requires seven colors, or both reverse and blink
highlight display attributes, you can use the following statements to establish those
requirements:
The SET MINIMUM-COLOR statement establishes the minimum level of
support for color display attributes.
The SET MINIMUM-ATTR statement establishes the minimum level of
support for highlight and outline display attributes.
For further information about the SET MINIMUM-ATTR and SET MINIMUM-
COLOR statements and their default values, see the Compaq NonStop
Pathway/iTS SCREEN COBOL Reference Manual.
To establish the attributes required for a program unit, you issue statements such as
the following before a DISPLAY BASE statement:
MOVE 1 TO IBM-FULL-COLOR OF WS-MINIMUM-COLOR.
MOVE 1 TO IBM-FIELD-OUTLINE OF WS-MINIMUM-ATTRIBUTE.
SET MINIMUM-COLOR USING WS-MINIMUM-COLOR.
SET MINIMUM-ATTR USING WS-MINIMUM-ATTRIBUTE.
Note. The minimum level of support for color display attributes does not change until a
subsequent SET MINIMUM-COLOR statement is executed, even if you use a CALL
statement to move between program units. Likewise, the minimum level of support for
highlight or outline display attributes does not change until a subsequent SET MINIMUM-
ATTR statement is executed, even if you use a CALL statement to move between program
units.