광고
광고
Timer-related tasks
Interval control includes timer-event driven tasks that initiate actions scheduled by
CICS commands. This facility examines the interval control element (ICE) storage chain contained in the CICS shared system storage for expired events, and initiates the appropriate action. After the ICE has expired, its entry is removed from the chain.
A timer-related task can be in any of three states: v Unexpired—the expiration time for the task or event is still in the future v
Expired but suspended due to a CICS resource being unavailable v
Expired and awaiting execution
When a task expires, interval control attempts to schedule the task for execution if all the CICS resources that it requires are available. If any of the resources are not available, the entry is said to be suspended waiting for a resource to become available. When it is determined that all resources are available, the entry is then said to be enabled awaiting execution.
Expiration times
The time at which a time-controlled function is to be started is known as the
expiration time
. You can specify expiration times absolutely, as a time of day
(using the TIME option), or as an interval that is to elapse before the function is to be performed (using the INTERVAL option). For the EXEC CICS DELAY, EXEC
CICS POST, and EXEC CICS START commands, both INTERVAL and TIME options are available. For the EXEC CICS DELAY command, you can use the FOR and UNTIL options; and for the EXEC CICS START command, you can use the
AFTER and AT
®
You use an
interval
to tell CICS to start a transaction in a specified number of hours, minutes, and seconds from the current time. A nonzero INTERVAL value always indicates a time in the future—the current time plus the interval you specify. The hours may be 0–99, but the minutes and seconds must not be greater than 59. For example, to start a task in 40 hours and 10 minutes, you would code:
EXEC CICS START INTERVAL(401000)
To use the AFTER option for the same example, you would code:
EXEC CICS START AFTER HOURS(40) MINUTES(10) or
EXEC CICS START AFTER MINUTES(2410)
You use an
absolute time
to tell CICS to start a transaction at a specific time, again using hhmmss. For example, to start a transaction at 3:30 in the afternoon, you would code:
194
CICS for iSeries Application Programming Guide V5
EXEC CICS START TIME(153000)
An absolute time is always relative to the midnight before the current time and may therefore be earlier than the current time. TIME may be either in the future or the past relative to the time at which the command is executed.
To use the AT option for the same example, you would code:
EXEC CICS START AT HOURS(15) MINUTES(30) or
EXEC CICS START AT MINUTES(930)
CICS uses the following rules: v
If you specify a task to start at any time within the previous six hours, it will start immediately, unless the start time is before midnight (past) of the day on which you specify it. For example:
EXEC CICS START TIME(123000)
This command, issued at 05:00 or 07:00 on Monday expires at 12:30 on the same day.
EXEC CICS START TIME(020000)
This command, issued at 05:00 or 07:00 on Monday expires immediately because the specified time is within the preceding six hours.
EXEC CICS START TIME(003000)
This command, issued at 05:00 on Monday expires immediately because the specified time is within the preceding six hours. However, if it is issued at 07:00 on Monday, it expires at 00:30 on Tuesday, because the specified time is not within the preceding six hours.
EXEC CICS START TIME(230000)
This command, issued at 02:00 on Monday expires immediately because the specified time is within the preceding six hours. v If you specify a time with an hours component that is greater than 23, you are specifying a time on a day following the current one. For example, a time of
250000 means 1 a.m. on the day following the current one, and 490000 means 1 a.m. on the day after that.
Chapter 18. Interval control
195
다운로드
광고