Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-122
SET Statement
screen-identifier
specifies the screen fields whose positions are to be stored; maximum of 127 per SET
statement. Each
screen-identifier
can name an entire screen, a screen group, or
an elementary input item of any base or overlay screen that is currently displayed. If
screen-identifier
is a group, all subordinate elementary items that have a TO,
FROM, or USING phrase in their definitions are included in the reference.
screen-
identifier
cannot be a subscripted item.
The default cursor position is the first screen field defined with a TO or USING clause
for the current ACCEPT statement.
DEPENDING ON
identifier
selects zero or one
screen-identifier
from the list. The statement whose
position in the
screen-identifier
list is the same as the value in
identifier
is selected. If the value in
identifier
is less than 1 or greater than the number
of
screen identifiers
, no
screen-identifier
is selected.
SHADOWED
selects from the
screen-identifier
list only those fields that have
SHADOWED items in which the SELECT bit is set; fields that do not have
SHADOWED items are not selected.
The SET statement selects fields in sequence from top to bottom and left to right as
the fields are positioned on the screen. The field having the lowest row (line) number
is selected before a field with a higher row number. For fields in the same row, the
field having the lowest column number is selected before the field with a higher column
number.
The SET statement places the row and column numbers of the leftmost character of
the first selected field into the special register NEW-CURSOR. The implied structure of
NEW-CURSOR is:
If the value specified in the special register NEW-CURSOR is not a valid screen
position when an accept operation begins, the cursor is positioned to the first
unprotected field of the ACCEPT statement for a 65xx terminal or to the first field of the
ACCEPT statement for an IBM 3270 terminal. (IBM 3270 terminals do not prevent
cursor positioning at a protected field.)
After execution of an ACCEPT statement, the special register is set to zero; this sets
the cursor position for the next ACCEPT statement. For 65xx terminals, the cursor
position is at the first unprotected field of the ACCEPT statement. For IBM 3270
Note. If neither the DEPENDING ON modifier nor the SHADOWED modifier is specified, all
fields in the
screen-identifier
list are selected.
01 NEW-CURSOR.
02 NEW-CURSOR-ROW PIC 9999 COMP.
02 NEW-CURSOR-COL PIC 9999 COMP.










