Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
5-53
Field-Characteristic Clauses
ALTERNATE OR TERMINAL
TO WS-PROD-COUNT.
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 runs 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).
REDEFINES
field-name-2
SHADOWED [ BY ]
data-name-1