COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 39 Record Description Entries
WORKING-STORAGE SECTION.
01 DATA-TO-CHECKPOINT.
05 USER-INPUTS.
10 COMMAND-IN PICTURE X(8) VALUE SPACES.
10 TRAN-CODE PICTURE 999 VALUE ZERO.
10 REPORT-TO-PRINT PICTURE 99 VALUE ZERO.
10 REPORT-NUMBER PICTURE 99 VALUE ZERO.
05 PERFORM-FLAGS PICTURE 9.
88 BAD VALUE 0.
88 GOOD VALUE 1.
01 CURRENT-DATE.
05 CURRENT-YEAR PICTURE 99 VALUE ZERO.
05 CURRENT-MONTH PICTURE 99 VALUE ZERO.
05 CURRENT-DAY PICTURE 99 VALUE ZERO.
01 REPORT-HEADING-1.
05 FILLER PICTURE X(7) VALUE SPACES.
05 REPORT-MM PICTURE 99.
05 FILLER PICTURE X VALUE "/".
05 REPORT-DD PICTURE 99.
05 FILLER PICTURE X VALUE "/".
05 REPORT-YY PICTURE 99.
05 REPORT-YY PICTURE 99.
05 FILLER PICTURE X(7) VALUE SPACES.
...
01 MONTH-ABBREVIATIONS
VALUE "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC".
03 MON-ABBR PIC X(3) OCCURS 12 TIMES.
01 CONSTANTS-FOR-I-O.
05 ERROR-MSG-CONST PICTURE X(13) VALUE "*** ERROR ***".
...
01 CONSTANTS-FOR-LOGIC.
...
Initializing Data Items
The value to which a data item is initialized is determined by:
• EXTERNAL clause
A data item described with an EXTERNAL clause (an external data item) cannot have a VALUE
clause and is not affected by events that cause internal data items to be initialized. Its contents
are unpredictable until a program assigns a value to it. Thereafter, it retains the last value
assigned to it throughout the current execution of the run unit.
• VALUE clause
With some exceptions, you can set the initial value of an internal data item by including a
VALUE clause in its data description entry (for exceptions, see VALUE Clause).
• BLANK and NOBLANK directives
When a data item is not described with a VALUE clause, the BLANK or NOBLANK directive
determines its initial value (see BLANK and NOBLANK (page 539)).
• BASED clause
The implicit pointer associated with a BASED data item is initialized to NULL; that is, the
BASED item is not associated with any storage.
Working-Storage Section 177










