Time-initiated REXX EXECs
Time–initiated EXECs are scheduled in the following circumstances:
An EXEC name is specified in the BMC AMI Ops Automation TIMEXEC application.
These EXECs are scheduled by the BMC AMI OpsA Timer Facility when the user-defined time condition occurs. see Describing the TIMEXEC Application.
- 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.
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, see Managing-daylight-saving-time-and-time-initiated-automation.
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 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 the following table.
Positional parameter | Description of parameter value |
---|---|
1 | EXECNAME - one- to eight-character name of this EXEC |
2 | One- to eight-character target name |
3 | BMC AMI Ops Automation for IMS only The four-character IMS ID that is used by BMC AMI Ops Automation for IMS only. This variable must be coded; however, its value is unpredictable for BMC AMI Ops Automation for CICS and BMC AMI Ops Automation for z/OS. |
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 | BMC AMI Ops Automation for IMS only This value is not used by BMC AMI Ops Automation for CICS or BMC AMI Ops Automation for z/OS. This variable must be coded; however, its value is unpredictable for BMC AMI Ops Automation for CICS and BMC AMI Ops Automation for z/OS. 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 | BMC AMI Ops Automation for IMS only This value is not used by BMC AMI Ops Automation for CICS or BMC AMI Ops Automation for z/OS. This variable must be coded; however, its value is unpredictable for BMC AMI Ops Automation for CICS and BMC AMI Ops Automation for z/OS. IMS/VS restart type, as follows:
It remains INACT until IMS/VS restarts and the first checkpoint is taken. |
11 | BMC AMI Ops Automation for IMS only This value is not used by BMC AMI Ops Automation for CICS or BMC AMI Ops Automation for z/OS. This variable must be coded; however, its value is unpredictable for BMC AMI Ops Automation for CICS and BMC AMI Ops Automation for z/OS. 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
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 |
Example description
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 BMC AMI Ops 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.