Getting the system date under CICS
To
retrieve the system date in a CICS® program,
use a format-2 ACCEPT
statement or
the CURRENT-DATE
intrinsic function.
About this task
You can
use any of these format-2 ACCEPT
statements in CICS to
get the system date:
ACCEPT identifier-2 FROM DATE
(two-digit year)ACCEPT identifier-2 FROM DATE YYYYMMDD
ACCEPT identifier-2 FROM DAY
(two-digit year)ACCEPT identifier-2 FROM DAY YYYYDDD
ACCEPT identifier-2 FROM DAY-OF-WEEK
(one-digit integer, where 1 represents Monday)
You can use this format-2 ACCEPT
statement in CICS to
get the system time:
ACCEPT identifier-2 FROM TIME
Alternatively, you can use
the CURRENT-DATE
intrinsic
function, which can also provide the time.
These methods work in both CICS and non-CICS environments.
Do not use a format-1 ACCEPT
statement
in a CICS program.