Time-initiated REXX EXECs
Time–initiated EXECs are scheduled in the following circumstances:
An EXEC name is specified in the MainView AutoOPERATOR TIMEXEC application.
These EXECs are scheduled by the MainView AutoOPERATOR Timer Facility when the user-defined time condition occurs. Refer to the section called 'TIMEXEC Application' in the MainView AutoOPERATOR Basic Automation Guide, Volume 2.
- A BLK request is issued.
An EXEC-initiated EXEC uses the CALLX service.
For example, by coding
'IMFEXEC IMFC SET REQ=CALLX @HOURLY START=06:00:00 STOP=16:00:00
I=01:00:00'EXEC @HOURLY will execute every hour, beginning at 6:00 A.M. and ending at 4:00 P.M.
- The @TIMER sample solution is used (refer to the MainView AutoOPERATOR Basic Automation Guide, Volume 1: Using Rules for more information).
For information about how your automation with time–initiated EXECs can be affected when you change the MVS Local Time to observe daylight savings time, refer to Appendix A, 'Managing daylight savings time and MainView AutoOPERATOR time-initiated automation' in the MainView AutoOPERATOR Basic Automation Guide, Volume 2.
Potential use
Any production environment that follows a daily schedule requires specific jobs to start and stop at the same time every day.
Using the MainView AutoOPERATOR Timer Facility, you can have EXECs automatically scheduled at specific times to perform automation tasks or react to certain activities.
Parameters passed to the EXEC
Time-initiated EXECs have specific information passed to the 11 positional parameters as described in Table 1.
Table 1. Time-initiated EXEC parameters and values
Positional parameter | Description of parameter value |
---|---|
1 | EXECNAME - one- to eight-character name of this EXEC |
2 | one- to eight-character target name |
3 | MainView AutoOPERATOR for IMS only The four-character IMS ID that is used by MainView AutoOPERATOR for IMS only. This variable must be coded; however, its value is unpredictable for MainView AutoOPERATOR for CICS and MainView AutoOPERATOR for MVS. |
4 | four-character BBI-SS PAS Subsystem identifier |
5 | current Gregorian date in mm/dd/yy format |
6 | time the EXEC is scheduled The time is in the hours:minutes:seconds format of hh:mm:ss. This time indicates when the timer-driven request interval expires. In a congested system, the actual EXEC execution could be delayed because of MVS dispatching priorities. |
7 | day of the week where 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday |
8 | current Julian date in yyddd format |
9 | MainView AutoOPERATOR for IMS only This value is not used by MainView AutoOPERATOR for CICS or MainView AutoOPERATOR for MVS. This variable must be coded; however, its value is unpredictable for MainView AutoOPERATOR for CICS and MainView AutoOPERATOR for MVS. This value is the elapsed time that IMS/VS has been active in the total hours:minutes:seconds format of hhh:mm:ss. This time is the elapsed control region job time, not the elapsed time since the first IMS/VS checkpoint. If IMS/VS is not active, the value is 000:00:00. |
10 | MainView AutoOPERATOR for IMS only This value is not used by MainView AutoOPERATOR for CICS or MainView AutoOPERATOR for MVS. This variable must be coded; however, its value is unpredictable for MainView AutoOPERATOR for CICS and MainView AutoOPERATOR for MVS. IMS/VS restart type, as follows: ERE: Emergency restart WARM: Warm restart COLD: Cold restart INACT: IMS/VS is not active. This value is also passed during
It remains INACT until IMS/VS restarts and the first checkpoint is taken. |
11 | MainView AutoOPERATOR for IMS only This value is not used by MainView AutoOPERATOR for CICS or MainView AutoOPERATOR for MVS. This variable must be coded; however, its value is unpredictable for MainView AutoOPERATOR for CICS and MainView AutoOPERATOR for MVS. The value is a one- to five-digit number for the number of times the EXEC has been scheduled. The P10 value is reset to 1 every time the P9 status changes. |
It is not always necessary to identify all 11 parameters on the PROC statement. For example, an EXEC may only require positional parameter eight (the current Julian date). In this case only the first eight parameters need to be coded on the PROC statement. The required PROC would be
Example
Figure 1. Time-initiated REXX EXEC example
ARG EXECNAME
/*---------------------------------------------------------------*/
/*EXEC Description: This sample EXEC displays the status of your*/
/* system. */
/*---------------------------------------------------------------*/
/*Positional Parameter Count: */
/* */
/*11 The total number of ARG parameters. This value will*/
/* always be 11 for a time-initiated EXEC. */
/* */
/*Symbolic Parameter Definitions: */
/* */
/*SSTATUS The BBPROC member name for this EXEC. */
/* */
/*---------------------------------------------------------------*/
'IMFEXEC CMD .D V,ALL' /* Displays all shared variables */
'IMFEXEC CMD .D L,ALL' /* Displays of all BBI-SS PAS/BBI-SS PAS Links */
'IMFEXEC CMD .D R' /* Displays remote users */
'IMFEXEC CMD .D A' /* Displays ACTIVE STATUS */
EXIT
The positional parameters passed to the ARG statement of the time–initiated EXEC are shown in the following table:
Positional parameter | Variable name | Variable passed | Description of variable passed |
---|---|---|---|
1 | EXECNAME | SSTATUS | name of the EXEC scheduled by the timer facility |
Describing the example
This EXEC uses the IMFEXEC CMD command to issue various BBI control commands to be logged to the BBI -SS PAS Journal.
The ARG statement is written as the first REXX statement of the EXEC named SSTATUS by specifying
where
- ARG instructs REXX to process the arguments passed to this REXX EXEC.
- EXECNAME is a variable that contains the name of the EXEC.
There is only one positional parameter in this statement, which is the variable containing the EXEC name. The remaining 10 positional parameters are ignored.
This time-initiated EXEC is scheduled to take a snapshot of the BBI environment. The EXEC uses only one input variable for this task and it issues four BBI control commands so the output is recorded in the BBI-SS PAS Journal. This process allows you to review the data.