Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
6-90
SET MINIMUM-ATTR Statement
The DEPENDING ON clause for the SET 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.
SET NEW-CURSOR AT SCREEN-FLD1,
SCREEN-FLD2,
SCREEN-FLD3,
DEPENDING ON WS-SCREEN-STATUS.
ACCEPT MENU1
:
If WS-SCREEN-STATUS equals 1, the cursor is positioned at SCREEN-FLD1 upon
execution of the ACCEPT statement. If WS-SCREEN-STATUS equals 2, the cursor is
positioned at SCREEN-FLD2 upon execution of the ACCEPT statement, 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 the cursor is left at its default position.
SET MINIMUM-ATTR Statement
The SET MINIMUM-ATTR statement establishes the minimum level of support for
highlight and outline display attributes.
data-name
specifies the Working-Storage group item template for highlight and outline display
attributes.
SET MINIMUM-ATTR USING data-name.