Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-138
Attribute Handling for IBM 3270 Terminals
The DEPENDING ON clause for the TURN statement is analogous to the
DEPENDING ON clause for the PERFORM ONE statement. The following example
illustrates this.
WORKING-STORAGE SECTION.
:
77 ws-screen-status PIC 9(4) COMP VALUE 1.
01 ws-fld1 PIC x(10).
01 ws-fld2 PIC x(10).
01 ws-fld3 PIC x(10).
SCREEN SECTION.
:
01 MENU1 SIZE 24, 80.
05 screen-fld1 at 4, 20
PIC X(10)
from fld1.
05 screen-fld2 at 5, 40
PIC X(10)
from fld2.
05 screen-fld3 at 6, 60
PIC X(10)
from fld3.
PROCEDURE DIVISION.
:
BODY-PARAGRAPH.
:
DISPLAY BASE MENU1.
DISPLAY MENU1.
TURN REVERSE IN SCREEN-FLD1,
SCREEN-FLD2,
SCREEN-FLD3,
DEPENDING ON WS-SCREEN-STATUS.
If WS-SCREEN-STATUS equals 1, SCREEN-FLD1 is displayed in REVERSE. If WS-
SCREEN-STATUS equals 2, SCREEN-FLD2 is displayed in REVERSE, and so on. It
is not considered erroneous if WS-SCREEN-STATUS < 1 or WS-SCREEN-
STATUS>3. Control just falls through (execution continues with the next statement)
and no screen field is displayed in REVERSE.
Attribute Handling for IBM 3270 Terminals
Following are the conflicting scenarios you might encounter when you dynamically set
the display attributes by using the TURN Statement.
•
If you change a field’s HIDDEN attribute to a BLINK, BRIGHT, REVERSE, or
UNDERLINE attribute, there is no effect on the display.
•
If you change a field with a BLINK attribute to HIDDEN, the field changes to
HIDDEN.










