Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-13
REDEFINES Clause
If a VALUE clause is declared for a PIC N Working-Storage Section field, the value can
consist only of characters from the Shift-JIS character set (X 0208) enclosed in
quotation marks ("").
You can use the THRU/THROUGH clause with level 88 data items associated with
double-byte character set literals. Byte-by-byte comparisons of all items in the
THRU/THROUGH clause are performed. Double-byte character set data used in the
THRU/THROUGH clause is treated as a byte string.
The following examples illustrate PICTURE strings for double-byte data:
10 data-id PIC N.
10 data-name-1 PIC NNNN.
10 data-name-2 PIC N(10).
REDEFINES Clause
The REDEFINES clause allows a computer storage area to be described in more than
one way. This capability is valuable for such tasks as input data validation when tests
require different descriptions of the data. This capability is convenient when some
portions of a record are constant, while other portions vary.
data-name-2
is the data item being redefined.
The REDEFINES entry must immediately follow the entry for the data item being
redefined or must immediately follow the last item subordinate to that data item. The
level number of the REDEFINES entry must be the same as the item being redefined by
the clause.
The following rules apply to the REDEFINES clause:
•
Level 66 and level 88 data items cannot be redefined.
•
The redefined data item cannot have an OCCURS clause or a REDEFINES clause.
•
The data name of the redefined item cannot be subscripted or qualified.
•
Neither the original definition nor the redefinition can include an item whose size is
variable due to an OCCURS clause of a subordinate entry.
•
A VALUE clause cannot be included.
•
When the level number is not 01, the redefinition should be the same as the number
of character positions (bytes) in the data item you are redefining..
•
The redefined item can be subordinate to an item with an OCCURS clause or a
REDEFINES clause.
•
The REDEFINES entry can be followed by subordinate data entries. Redefinition
continues until the appearance of a level number less than or equal to that of the data
name being redefined or until the ending of the current section of the Data Division.
REDEFINES data-name-2