COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Typical DefinitionsData Item
PICTURE 9DAY-OF-WEEK
TIME PICTURE 9(8) or
PICTURE 99B99B99B99
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.
DAY-OF-WEEK
delivers the value of the current day of the week expressed as an integer between 1 and 7,
inclusive. The value 1 represents Monday, 2 represents Tuesday, and so on.
TIME
delivers the current time of day. TIME behaves like a data item described with the PICTURE
character-string 9(8) organized as four pairs of digits—hhmmsscc, where hh is the hour
(based on a 24-hour clock), mm is the minutes, ss is the seconds, and cc is the hundredths
of seconds. For example, 2:41 p.m. is expressed as 14410000. The minimum value of TIME
is 00000000; the maximum value is 23595999.
In Example 75, ACCEPT statements tell the executing process to store the current day of the week
(integer) in DAY-SUB, the current date (yymmdd ) in TODAYS-DATE, the current time (hhmmsscc
) in TIME-RIGHT-NOW, and 40 characters from the home terminal in USER-REPLY.
ACCEPT 283










