Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-89
SET Statement
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 terminals, the
cursor position is at the first field of the ACCEPT statement defined with a TO or
USING clause.
If you do not want the cursor positioned at a protected field on an IBM3270 terminal,
you can use a SET statement to position the cursor at an unprotected field.
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.