Time schedule requests
A time schedule request is a statement in a TCO script that tells IMS to process a particular task at a specified time. A time schedule request also specifies which exit routine is scheduled and what data should be passed to the exit routine.
A time schedule request can specify:
- A time of day, by hour and minute.
- A range of times, for example, every 10 minutes from 10:00 to 16:00.
- IMS startup. Requests are scheduled immediately after IMS restart, or when a new script is loaded.
- A specified delay after IMS startup, for example, 10 minutes after startup.
A time schedule request either contains 16 bytes of data or refers to a variable-length message set that contains one or more single segment or multi-segment messages.
The following figure shows two message sets and time schedule requests for broadcasting a message. The example also shows a scale to indicate the alignment of the fields.
.........1.........2.........3.........4.........5.........6.........7.........8
/BRO LTERM CTRL S00000001
THE IMS TIME-CONTROLLED OPERATION IS UP. 00000002
*TIME DFSTXIT0 S **** 00000003
/BRO LTERM CTRL S00000004
FIVE MINUTES HAVE ELAPSED SINCE STARTUP, AND TCO IS ACTIVE. 00000005
*TIME DFSTXIT0 0005 S **** 00000006
/BRO LTERM CTRL
THE IMS TIME-CONTROLLED OPERATION IS UP
The presence of
the S in column 72 indicates the end of a segment and that the next
segment is part of the same message. If there are any errors in this
message set, the numbers will be added to the error message. The time
schedule request indicates that this broadcast should take place as
soon as the script is initialized./BRO LTERM CTRL
FIVE MINUTES HAVE ELAPSED SINCE STARTUP, AND TCO IS ACTIVE
The
associated time schedule request indicates that this message should
be broadcast 5 minutes after the script is initialized.Required fields for time schedule requests
The required fields for a time schedule request specify the following: the time you want the task to be performed, and to which exit routine to pass the script.
- Columns 1-5 (ID) IDENTIFICATION
Must contain the characters *TIME. All other requests are treated as message sets.
- Columns 12-19 (NAME) USER EXIT ROUTINE NAME
Must include the one- to eight-character name of the exit routine in the IMS.SDFSRESL data set. If the name has fewer than eight characters, it must be left-justified and padded to the right with blanks. NAME must begin in column 12.
Optional fields for time schedule requests
By specifying one or more optional fields, you can request tasks to be processed during IMS startup or at a specified time following startup. You can also specify for processing to start, stop for an interval, and then restart.
- Columns 7-10 (HHMM) START TIME
The time the task should start. A start time is required unless the request is for startup. Valid values for HH are 00 to 23, and valid values for MM are 00 to 59.
- Columns 21-24 (HHMM) END TIME
The time the task should end. Use this field only if you specify an interval time in columns 26-29. Otherwise, the field is ignored. This time must be a later time than the start time specified in columns 7-10. Valid values for HH are 00 to 23, and valid values for MM are 00 to 59.
If you request multiple dispatching for a task, the end time also stops the multiple dispatching. If you do not specify an end time, multiple dispatching continues until the end of the day (2359).
- Columns 26-29 (HHMM) INTERVAL TIME
This field specifies the amount of time you want to defer a request. The interval time can be any time after the start time (or startup) to a time before this request is to be dispatched. Valid values for HH are 00 to 23, and valid values for MM are 00 to 59.
- Column 31 (Flag) RESIDENT INDICATOR Specifies whether the exit routine is resident in memory. If you specify any request for an exit routine as resident, all requests use the resident copy. The options for this column are:
- Blank
- The exit routine is resident and paged in and out as required.
- D
- The exit routine is loaded each time a request is generated.
There is an advantage and a disadvantage to specifying the exit routine as resident:
- Advantage: the request is performed more quickly because the system does not have to load the routine each time it is needed to process a time schedule request.
- Disadvantage: the resident copy is always used; IMS does not load a new copy. If you want to
load a new copy of the exit routine, you must either change the resident
indicator on the time schedule request statements to
D
, or reload the TCO script usingDFSTCF LOAD
.
- Column 32 (Flag) DISPATCH INDICATOR Specifies when the request is dispatched (started). The options for this column are:
- Blank
- The request is dispatched each day at the start time specified in columns 7-10. The start time in columns 7-10 is required.
- O
- The request is dispatched the first day the script member is loaded. It is not dispatched again until the TCO script is reinitialized. A start time in columns 7-10 is required.
- S
- The request is dispatched as soon as the script member is initialized,
either when IMS starts or when
the script member is loaded. The start time, if specified in columns
7-10, is ignored.
If you specify an interval time in columns 26-29, the request is delayed from startup before the request is scheduled. With the
S
option, the request is processed only once each time IMS is initialized or the script-member is reloaded.
- Columns 33-35
Reserved
- Columns 56-71 MESSAGE FLAG
This field includes 16 bytes of data to be passed to the exit routine, plus the time of day. You can choose any data, or you can leave the field blank. If you set this flag to
****
, the previous message set, if any, is passed to the exit routine instead of the 16 bytes found in the time schedule request. - Columns 73-80 LINE NUMBER
Sequence numbers for the requests. If IMS or the TCO Verification utility detects an error, the number found in columns 73-80 is included in the error message to help you to identify the cause of the error.
Recommendation: Include sequence numbers for all commands and message sets.