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

Figure 13 ACCEPT Statement Collecting Numeric Data
ACCEPT With DATE, DAY, DAY-OF-WEEK, or TIME Phrase
ACCEPT with a DATE, DAY, DAY-OF-WEEK, or TIME phrase retrieves the numeric representation
of the date, day, day of the week, or time from the operating system.
NOTE: A simpler alternative is the CURRENT-DATE Function (page 664).
accept-name
is the identifier of the data item to which the representation of the day, date, day of the week,
or time is moved (following the rules for the MOVE statement). Typical definitions for the data
items are:
Typical DefinitionsData Item
Without YYYYMMDDDATE PICTURE 9(6) or
PICTURE 99B99B99
With YYYYMMDD PICTURE 9(8) or
PICTURE 9999B99B99
Without YYYYDDDDAY PICTURE 9(5) or
PICTURE 99B999
With YYYYDDD PICTURE 9(7) or
PICTURE 9999B999
282 Procedure Division Verbs