Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-15
ACCEPT DATE/DAY/TIME Statement
DATE
is the current date expressed as a 6-digit number yymmdd where yy  is the year, 
mm is the month, and dd is the day. For example, November 25, 1997, would be 
returned as 971125.
DAY YYYYDDD
is the current Julian date expressed as a 7-digit number yyyyddd where yyyy is 
the year and ddd is the day of the year. For example, February 25, 2001, would be 
returned as 2001056.
DAY
is the current Julian date expressed as a 5-digit number yyddd where yy is the year 
and ddd is the day of the year. For example, March 3, 1998, would be returned as 
98062.
TIME
is the current time based on a 24-hour clock, expressed as an 8-digit number 
hhmmsscc where hh is the hour, mm the minutes, ss the seconds, and cc the 
hundredths of seconds. For example, the time 2:41 P.M. would be returned as 
14410000. The range of values allowed is 00000000 through 23595999.
The following sentence stores the current date (yymmdd) in todays-date, the 
Julian date (yyddd) in julian-date, and the current time (hhmmsscc) intime-
right-now:
WORKING-STORAGE SECTION.
01 date-and-time-fields.
 05 todays-date-full PIC 9(8) VALUE ZERO.
 05 todays-date PIC 9(6) VALUE ZERO.
 05 julian-date-full PIC 9(7) VALUE ZERO.
 05 julian-date PIC 9(5) VALUE ZERO.
 05 time-right-now PIC 9(8) VALUE ZERO.
 :
PROCEDURE DIVISION.
 :
 ACCEPT todays-date-full FROM DATE YYYYMMDD
 ACCEPT todays-date FROM DATE
 ACCEPT julian-date-full FROM DAY YYYYDDD
 ACCEPT julian-date FROM DAY
 ACCEPT time-right-now FROM TIME










