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

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-52
Field-Characteristic Clauses
REDEFINES Clause
The REDEFINES clause specifies that the screen field being defined is an alternate
interpretation of a previously defined field.
field-name-2
is the previously defined field.
The two fields must be identical in size and display attributes.
The REDEFINES clause allows an ACCEPT statement to be issued for a given physical
field for two cases using different rules. An example would be postal codes in the U.S.
and in the U.K.
05 ZIP-US AT 10, 10 PIC 999999
LENGTH 0, 5
TO ZIP-US-WS.
05 ZIP-UK REDEFINES ZIP-US PIC XXXXXX
LENGTH 0, 6
TO ZIP-UK-WS.
Either the REDEFINES or the AT clause must be included in every screen-field
declaration. If both clauses appear in the screen-field declaration, they must refer to the
same position.
SHADOWED Clause
The SHADOWED clause associates a nonliteral screen field with a Working-Storage
data item (shadow item). The shadow item can be used to determine whether input was
supplied for the screen field or to control selection of the screen field for output
statements.
A shadow item is used in association with a SHADOWED modifier that can be included
in the following statements: DISPLAY, RESET, SET NEW-CURSOR, and TURN.
When one of these statements executes and includes a SHADOWED modifier, the
shadow items that are referred to in the statement are automatically examined.
Resulting action depends on the value of the shadow items.
data-name-1
is the data item to be associated with a nonliteral screen field. Define
data-name-1 in the Working-Storage Section with a size of one byte (PIC X,
PIC 9, or PIC 9 COMP).
A shadowed screen field is associated with at least two Working-Storage items, the
primary item and the secondary (shadow) item. For example, below a USING clause
(which could be either TO or USING) associates a primary Working-Storage item with
REDEFINES field-name-2
SHADOWED [ BY ] data-name-1