COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Example 43 FILLER Keyword
WORKING-STORAGE SECTION.
01 HEAD-1.
05 FILLER PIC X(10) VALUE "PART NUM".
05 FILLER PIC X(25) VALUE "DESCRIPTION".
05 FILLER PIC X(30) VALUE SPACES.
05 FILLER PIC X(15) VALUE "UNITS ON HAND"
01 BAD-NEWS.
02 THE-VALUES.
05 PIC X(45)
VALUE "That part number is invalid.".
05 PIC X(45)
VALUE "That job code is invalid.".
05 PIC X(45)
VALUE "That delivery date is a holiday.".
...
02 THE-MESSAGES REDEFINES THE-VALUES.
05 ERR-MESSAGE PIC X(45) OCCURS 15 TIMES.
Data items designated as FILLER can be conditional data items. This means that a FILLER item can
be followed by one or more level-88 items describing condition-names that have the value TRUE
when the FILLER item contains a certain value.
REDEFINES Clause
The REDEFINES clause enables you to describe the same computer storage area in more than one
way. This can be quite valuable for tasks such as input data validation, when tests require different
descriptions of the data. It is also convenient when some portions of a record are constant, while
other parts vary.
data-name-2
is the name of the existing data item that is being redefined as data-name-1.
In Example 44, the two records RECORD-IN and RECORD-TOTAL share the same storage space,
but their fields are different.
Descriptions of Records (Levels 01-49) 187