Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-16
ACCEPT DATE/DAY/TIME Statement
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
) in
time-
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










