COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-7
ACCEPT With DATE, DAY, DAY-OF-WEEK, or TIME
Phrase
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:
DATE
delivers the current date.
YYYYMMDD
Without YYYYMMDD, DATE behaves as if it were a data item described with the
PICTURE character-string 9(6) organized as yymmdd where yy is the year of the
century; for example, July 10, 1992, is represented as 920710.
With YYYYMMDD, DATE behaves as if it were a data item described with the
PICTURE character-string 9(8) organized as yyyymmdd; for example, July 10,
1992, is represented as 19920710.
DAY
delivers the current year and serial day number.
YYYYDDD
Without YYYYDDD, DAY behaves as if it were a data item described with the
PICTURE character-string 9(5) organized as yyddd; for example, January 23,
1992, is represented as 92023.
With YYYYDDD, DAY behaves as if it were a data item described with the PICTURE
character-string 9(7) organized as yyyyddd; for example, January 23, 1992, is
represented as 1992023.
Data Item Typical Definitions
DATE Without YYYYMMDD PICTURE 9(6) or
PICTURE 99B99B99
With YYYYMMDD PICTURE 9(8) or
PICTURE 9999B99B99
DAY Without YYYYDDD PICTURE 9(5) or
PICTURE 99B999
With YYYYDDD PICTURE 9(7) or
PICTURE 9999B999
DAY-OF-WEEK PICTURE 9
TIME PICTURE 9(8) or
PICTURE 99B99B99B99