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

Data Division
HP COBOL Manual for TNS/E Programs520347-003
7-47
FILLER Keyword
FILLER Keyword
The FILLER keyword, explicit or implicit, substitutes for a data-name when it is not
important that an item have a name. It is allowed on elementary or data structures.
Commonly, FILLER is used when you build records in the Working-Storage Section or
Extended-Storage Section for heading lines or error messages, where most of the text
is groups of literals.
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.
Example 7-9. Record Description Entries as Data Declarations
01 MEDICATIONS.
03 BRAND-NAME PICTURE X(50).
03 SIZE-IN-MG PICTURE 9999V99.
03 CONTRA-COUNT PICTURE 99.
03 CONTRAINDICATIONS OCCURS 1 TO 25 TIMES
DEPENDING ON CONTRA-COUNT
PICTURE X(50).
77 I-DEX PICTURE 9999
USAGE IS COMPUTATIONAL
VALUE IS ZERO.
Example 7-10. 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.