Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
5-13
REDEFINES Clause
Double-Byte Data
A double-byte data item that allows only double-byte data contains only N symbols in
the PICTURE string.
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.
REDEFINES
data-name-2










