A Control-M/Analyzer rule is invoked hourly, starting at noon. Control-M or another automated job scheduler will invoke the rule hourly, as long as the data has not arrived. The rule called ARWARN01 is run to notify various levels of users and management by sending a message to their TSO user IDs.
If the computer system time is between 12-1 P.M., a message is shouted to the operations manager on his or her user ID.
If the computer system time is between 1-3 P.M. and the condition still exists, the manager of ISD is informed. If the system time is 3 P.M. or later, with the same problem, the ISD vice president is informed.
Creating the ARWARNO1 Rule
Figure 43 Control-M/Analyzer Rule Definition Entry Panel
--------------- CONTROL-M/Analyzer RULE DEFINITION - ENTRY PANEL ------------(BR)
COMMAND ===>
SPECIFY LIBRARY, RULE
LIBRARY ===> CTB.PROD.RULES
RULE ===> xxxxxxxx (Blank for rule selection list)
USE THE COMMAND "SHPF" TO SEE PFK ASSIGNMENT 13.41.48
Figure 44 New Rule Definition Screen
CTB303E FILL IN THE REQUIRED FIELD RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER GROUP |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC |
| OPTIONS |
| =========================================================================== |
| EXECUTE UPON C |
| ON |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 13.43.34
Table 5 Fields to Define a New Rule
In field: |
Enter the following: |
---|---|
OWNER |
Fill in your user ID |
GROUP |
INTRAC |
DESC |
SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
These operations are usually performed in separate groupings of specifications called ON blocks. Every rule is made up of a series of one or more ON blocks. A simple rule may have just one ON block. A complex rule may have many ON blocks, as shown in Figure 45.
Figure 45 Typical Rule Structure
This first rule is very simple. The only data item with which you need concern yourself is available to you within Control-M/Analyzer—the computer system time. All you need to do is check the time and issue various warnings to various users, based on how late in the day it is.
Usually, two types of ON blocks are required in a rule—Input blocks, to extract data from a file or report, and ON DATA blocks, to perform comparisons and balancing actions on the extracted data. In this rule, you will use only an ON DATA block, as illustrated in Figure 46.
You can enter and update rules using a standard system editor if you are familiar with Control-M/Analyzer rule syntax. Because you are a beginning user, continue using this "fill-in-the-blanks" approach to specify and verify the rule parameters.
Figure 46 ON DATA Block Structure
When you work with Control-M/Analyzer variables, instead of external data such as reports or files, the ON block is structured as shown in Figure 46. In that ON block structure
Note: All ON DATA blocks begin with an EXECUTE statement.
This gives you the capability of taking different balancing actions on the data, depending on your needs.
Creating an ON block
You will now define the first, and only, ON block for this rule.
The name of an ON block may be any eight characters, and is unique within the rule.
The value, DATA, indicates that this is an ON DATA block type. The ON DATA block indicates that the rule is operating on data, not on reports or other external sources of information.
Control-M/Analyzer now creates a blank field and prompts you to specify either ALWAYS or IF as the value.
Figure 47 Setting the ON Block Type
CTB303E FILL IN THE REQUIRED FIELD RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER M86 GROUP INTRAC |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
| OPTIONS |
| =========================================================================== |
| EXECUTE CHECK UPON C |
| ON DATA |
| IF (ENTER "ALWAYS", "IF") |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 13.50.56
Defining the ON DATA Block
You will now define the ON DATA block to do the following:
Figure 48 Flow of the ON DATA Block to Create
As illustrated in Figure 48, in the first IF condition you’ve just entered you will define the ON block to check for a time range between 12 and 1 P.M., and then perform the action "Warn Operations Manager!!"
To check the time, you need to access the computer system time with a system variable called SYSTIME. It has the format hhmmss, meaning a 6-digit number containing hours (hh), minutes (mm), and seconds (ss). The system clock is a 24-hour clock. This means that 1 o'clock in the afternoon, for example, appears as 130000 when read by the SYSTIME variable.
For more information on Control-M/Analyzer system variables, refer to the Control-M/Analyzer for z/OS User Guide.
With this information, you can now write the first IF condition.
Figure 49 Definition of the First IF Condition
LIBRARY : CTB.PROD.RULES RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER M86 GROUP INTRAC |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
| OPTIONS |
| =========================================================================== |
| EXECUTE CHECK UPON C |
| ON DATA |
| LABEL: |
| IF %%SYSTIME >= 120000 AND %%SYSTIME < 13000 C |
| DO |
| (ENTER "ALWAYS" OR "IF") |
| =========================================================================== |
| EXECUTE UPON C |
| ON |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 13.53.51
Notice the character "C" at the end of the line you just typed—this is the C (Continue) field. If you want to continue this same IF expression onto another line, you would enter a Y (for YES) in this field. An IF expression sometimes may be long and complex, requiring several lines.
Defining the Actions to Perform
You will now instruct Control-M/Analyzer to do the following:
Printing the message will provide a hard copy record that the rule was executed, and also illustrates the output that Control-M/Analyzer produces to help you understand what happened during execution of the rule.
Figure 50 Defining the DO Statements in an IF Condition
LIBRARY : CTB.PROD.RULES RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER M86 GROUP INTRAC |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
| OPTIONS |
| =========================================================================== |
| EXECUTE CHECK UPON C |
| ON DATA |
| LABEL: |
| IF %%SYSTIME >= 120000 AND %%SYSTIME < 13000 C |
| DO PRINT = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY F C |
| DO PRINT = ******** ACTION REQUIRED WITHIN 30 MINUTES ******* F C |
| DO |
| (ENTER "ALWAYS", "IF" OR "ELSE") |
| =========================================================================== |
| EXECUTE UPON C |
| ON |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 13.55.47
********* ACTION REQUIRED WITHIN 30 MINUTES *******
You will now define the command to send ("shout") the same message to the operations manager. For the purposes of this demonstration, you will actually send the message to yourself instead of the operations manager.
Figure 51 DO SHOUT Definition
LIBRARY : CTB.PROD.RULES RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER M86 GROUP INTRAC |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
| OPTIONS |
| =========================================================================== |
| EXECUTE CHECK UPON C |
| ON DATA |
| LABEL: |
| IF %%SYSTIME >= 120000 AND %%SYSTIME < 13000 C |
| DO PRINT = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY F C |
| DO PRINT = ******** ACTION REQUIRED WITHIN 30 MINUTES ******* F C |
| DO SHOUT TO TSO-M86 URGENCY U |
| = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY ************* |
| DO |
| (ENTER "ALWAYS", "IF" OR "ELSE") |
| =========================================================================== |
| EXECUTE UPON C |
| ON |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 14.16.07
TSO-xxxxxxxx
where xxxxxxxx is your TSO user ID.
DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY **********
To demonstrate what happens when a problem occurs, you will end the execution of this part of the rule as if there was a problem. When the operations staff reviews the log, they will see that this rule ended NOTOK.
The DO TERMINAT definition contains two fields for you to specify: =, for a result value, and COD, for a result code. In the following steps you will enter NOTOK as the result, and a sample code that informs the operations manager that this is the first warning. For the purposes of this demonstration, use the code 0009.
Figure 52 DO TERMINATE Definition
LIBRARY : CTB.PROD.RULES RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER M86 GROUP INTRAC |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
| OPTIONS |
| =========================================================================== |
| EXECUTE CHECK UPON C |
| ON DATA |
| LABEL: |
| IF %%SYSTIME >= 120000 AND %%SYSTIME < 13000 C |
| DO PRINT = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY F C |
| DO PRINT = ******** ACTION REQUIRED WITHIN 30 MINUTES ******* F C |
| DO SHOUT TO TSO-M86 URGENCY U |
| = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY ************* |
| DO TERMINAT = NOTOK COD 0009 |
| DO |
| (ENTER "ALWAYS", "IF" OR "ELSE") |
| =========================================================================== |
| EXECUTE UPON C |
| ON |
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 14.20.27
Note: The value 9 you just entered in the COD field is displayed with leading zeros.
Completing the Rule
You will now finish defining this rule and then test it.
Because you are simulating real conditions, you will define the following two actions which you would change when you implement the rule in production mode:
The word LABEL: is displayed after you enter the IF command
Note: Press PF08/PF20 to scroll to the next screen when entering characters.
Figure 53 The Entire ARWARN01 Rule
LIBRARY : CTB.PROD.RULES RULE :
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
| OWNER M86 GROUP INTRAC |
| UPDATED 13/12/00 - 13:43:34 BY M86 |
| DESC SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN |
| OPTIONS |
| =========================================================================== |
| EXECUTE CHECK UPON C |
| ON DATA |
| LABEL: |
| IF %%SYSTIME >= 120000 AND %%SYSTIME < 13000 C |
| DO PRINT = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY F C |
| DO PRINT = ******** ACTION REQUIRED WITHIN 30 MINUTES ******* F C |
| DO SHOUT TO TSO-M86 URGENCY U |
| = DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY ************* |
| DO TERMINAT = NOTOK COD 0009 |
| DO |
| LABEL: |
| IF %%SYSTIME >=13000 AND %%SYSTIME <150000 C |
| DO PRINT = DIV. INVOICES STILL NOT IN, URGENTS!!! F C |
| DO PRINT = ****************** HELP NEEDED NOW **************** F C |
| DO SHOUT TO TSO-M86 URGENCY U |
| = DIV. INVOICES STILL NOT IN, URGENT ACTION REQUIRED ********* |
| DO TERMINAT = NOTOK COD 0099 |
| DO |
| LABEL: |
| IF %%SYSTIME >= 150000 AND %%SYSTIME <180000 C |
| DO PRINT = DIV. INVOICES NEVER ARRIVED, EXECUTIVES WILL SUFFER F C |
| DO PRINT = ***** WHAT WILL YOU DO ABOUT IT? ****************** F C |
| DO SHOUT TO TSO-M86 URGENCY V |
| = DIV. INVOICES NEVER ARRIVED, EXECUTIVES WILL SUFFER ******** |
| DO TERMINAT = NOTOK COD 0999 |
| DO |
| ELSE |
| DO PRINT = TIME IS NOT BETWEEN 12 P.M. AND 6 P.M. F C |
| DO PRINT = YOU'RE OK FOR NOW, BUT DO NOT RELAX F C |
| DO SHOUT TO TSO-M86 URGENCY R |
| = TIME IS NOT BETWEEN 12 P.M. AND 6 P.M. |
| DO TERMINAT = OK COD 0000 |
| DO |
| (ENTER "ALWAYS", "IF") |
| =========================================================================== |
| EXECUTE UPON C |
| ON |
PLEASE FILL IN RULE DEFINITION. 14.28.31
Testing the Rule
The rule you just defined would probably be invoked by an automated operations product. For example, a job scheduler, such as the INCONTROL product, Control-M, would check for the existence of the divisional file at predetermined times. If the file is not found, the rule is invoked to warn the user.
You will now simulate this situation by executing this rule and seeing if it does what you expect it to do.
In the IOA SAMPLE library there is a member named CTBRULE1. To execute the rule you just created, you need to edit CTBRULE1 and then submit a job. In order to do this, you need to know how to:
If you are not familiar with how to perform these functions, ask your system administrator for assistance.
Figure 54 Editing the CTBRULE1 Member
EDIT ---- IOA*.*.SAMPLE(CTBRULE1) - 01.05 ------------------- COLUMNS 001 072
COMMAND ===> SUBMIT SCROLL ===> HALF
***** **************************** TOP OF DATA *********************************
000001 //ARWARN01 JOB ,GERR,CLASS=A,MSGCLASS=X,NOTIFY=M66A,REGION=4096K
000002 //STEP01 EXEC CTBTROLB,RULE=ARWARN01,GROUP-INTRAC
000003 //
***** ************************** BOTTOM OF DATA ********************************
Note that STEP01 has been set to invoke Control-M/Analyzer, then execute rule ARWARN01 from within group INTRAC. At this time you may
As you continue working on your system and the Control-M/Analyzer rule executes, you may notice a message similar to the following displayed on your screen:
CONTROL-B ********** CN (00)
CONTROL-B DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY *** 10.08 12:53 CN (00)
The exact text of the message depends on the time of day. If you do not receive a similar message on your screen, you may want to discuss this with your system administrator. However, you may continue this process even without receiving the message.
The execution of the rule also creates several output files. There are three Control-M/Analyzer outputs that help you understand rule execution:
Why do you need a listing of the rule when it is executed? Anyone who is authorized to update the rule library may be able to change a rule definition at any time. By having a listing of the rule at its execution, you know exactly how the rule was defined at that given time. You can save a great deal of guesswork when diagnosing a problem, by always having the correct documentation of a rule definition to work from.
If the rule executed correctly, the three outputs appear as follows:
Note: You may review the job results using a tool such as SDSF.
Figure 55 SYSUSER REPORT (Executed Outside Check Hours)
Note: The report for rule ARWARN01 will vary, depending upon what time you execute the rule.
Figure 56 SYSPRINT — Invocation Report
CONTROL-M/Anlayzer V6.1.00 - RUN TIME ENVIRONMENT
(C) BMC Software INC. 2001
Mission:
Rule : ARWARN01
Group : INTRAC
CTB10II - Compilation started
CTB110I - Compilation completed successfully
CTB111I - Highest Error Code was 0
CTB001I - CONTROL-M/ANALYZER RUNTIME ENVIRONMENT STARTED - MODE IS STAND-ALONE - SCOPE IS
UNSCHEDULED
CTB009I - GROUP-MODE IS "ACTIVE"
CTB00AI - INVOKED RULE-ARWARN01
*** CONTROL-M/ANALYZER SUMMARY OF INVOCATION REPORT ***
***----------------------------------------------------------------***
*** GROUP : INTRAC JOBNAME : M66CTB /JOB 1280 ***
*** MISSION : (NOMISS) RULE : ARWARN01 ***
*** CATEGORY: (NO-CATEGORY) OWNER : M66CTB ***
*** RUN ON : 10/10/01 - 12:13 ***
***----------------------------------------------------------------***
*
** ENTERING BLOCK: CHECK OF TYPE DATA
*
DIV. NVOICES STILL NOT IN, URGENT!!!
******************* HELP NEEDED NOW ***********************
=SHOUT : ‘DIV. INVOICES STILL NOT IN, URGENT ACTION REQUIRED********’ To: TSO-
CTB013I - ENDED "NOTOK" COMMITTED 0 VARIABLE(S) USERRC=0099
CTB002I - CONTROL-M/ANALYZER RUNTIME ENVIRONMENT ENDED
*** CONTROL-M/ANALYZER INVOICATION ENDED NOTOK USERCODE-OO99 ***
Note: This Invocation Report was produced from rule ARWARN01, run between 1 and 3 pm. The report shows
Figure 57 SYSRULE Report
*
*** RULE:ARWARN01 from DD : DABRULE ***
*
000001
000002 HEADER GROUP ‘INTRAC’ OWNER ‘M66’ DATE ‘101001’ TIME ‘155339’ CREATOR ‘M
000003 66’ DESC ‘SHOUT TO USERS IF DIVISIONAL AR DATA NOT IN’
000004
000005 EXECUTE ‘CHECK’
000006 ON_DATA
000007 IF ‘%%SYSTIME >= 100000 AND %%SYSTIE < 130000’
000008 DO PRINT DATA ‘DIV. INVOICES NOT IN, PLEASE CHECK IMMEDIATELY’
000009 DO PRINT DATA ‘********** ACTION REQUIRED WITHIN 30 MINUTES *******
.
.
.
000029 ELSE
000030 DO PRINT DATA ‘TIME IS NOT BETWEEN 12 P.M. AND 6 P.M.’
000031 DO PRINT DATA ‘YOU’’RE OK FOR NOW, BUT DO NOT RELAX’
000032 DO SHOUT MSG ‘TIME IS NOT BETWEEN 12 P.M. AND 6 P.M. --- RELAX ****
000033 ********’ URGENCY ‘R’ DEST ‘TSO-M66’
000034 DO TERMINATE RESULT OK USER_CODE 0
The SYSRULE report is a formatted printout of the rule as it existed in the library member at the time it was executed. For example, it shows:
These extra words, such as DATA and RESULT, help make the documentation easier to read.
Parent Topic |