Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-15
ACCEPT DATE/DAY/TIME Statement
These two exceptions apply only to the TURN and RESET statements that have the
TEMP modifier.
This MDT convention allows fields to be handled correctly when they contain errors.
When an error is detected in a field, a TURN TEMP statement of a display attribute is
normally performed on that field, whether explicitly by the program or implicitly by the
action of the ACCEPT statement. As indicated by the preceding rules, the MDT is set
also, thus guaranteeing that the data from the field will again be sent from the terminal
on the next read operation. After that next read operation, a RESET TEMP operation
is performed, which removes the flagging display attribute while again turning the MDT
bit on. The latter setting of the MDT is necessary because a subsequent read of the
same data might be performed if another field is found to be in error, and the data in
the field that was RESET must be sent once again to be properly accepted.
ACCEPT DATE/DAY/TIME Statement
The ACCEPT DATE/DAY/TIME statement causes the TCP to obtain the current
operating system settings for date, day, and time and return them to your program data
area.
accept-name
is the identifier of the data item where DATE, DAY, or TIME is stored. DATE, DAY,
and TIME are typically defined as:
PIC 9(8) for DATE YYYYMMDD
PIC 9(6) for DATE
PIC 9(7) for DAY YYYYDDD
PIC 9(5) for DAY
PIC 9(8) for TIME
DATE YYYYMMDD
is the current date expressed as an 8-digit number
yyyymmdd
where
yyyy
is the
year,
mm
is the month, and
dd
is the day. For example, November 25, 2002,
would be returned as 20021125.
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.
ACCEPT
accept-name
FROM { DATE [YYYYMMDD] | DAY [YYYYDDD] |
TIME }