Example
Issue the DEFACTN command to define an action to process based on some additional criteria. The DEFACTN command can be used in combination with other commands, such as DEFSCHD to determine when the action should be performed.
Example 1: Use the DEFACTN command to define an action to perform based on a specific schedule, as defined by the DEFSCHD command.
In this DEFACTN example, the action is sending a message (HELLO WORLD) to the monitored user (TS3163) at the scheduled time (WHEN NOW) listed in the DEFSCHD command.
GOMCMD OPMGRM1 DEFACTN NAME TEST1 COMMAND 'CP MSG TS3163 HELLO WORLD' ENV LVM
Ready; T=0.01/0.01 05:49:41
GOMCMD OPMGRM1 DEFSCHD NAME TES5SCHD ACTION TEST1 WHEN NOW
05:50:33 * MSG FROM OPMGRM1 : HELLO WORLD
Ready; T=0.01/0.01 05:50:33
Example 2: Use the DEFACTN command to define an action to perform based on a machine monitor rule, as defined in the DEFMMON command.
In this DEFACTN example, an action is defined to send a message when user MAINT640 is logged off.
GOMCMD OPMGRM1 DEFACTN NAME TEST5 COMMAND 'CP MSG MAINT640 IS LOGGED OFF' ENV LVM
Ready; T=0.01/0.01 02:16:45
GOMCMD OPMGRM1 DEFMMON NAME TEST9MON USER MAINT640 ACTION TEST5
Ready; T=0.01/0.01 02:17:29
A message is sent by Operations Manager indicating that this user, MAINT640, has logged off. An example is shown below.
02:19:00 * MSG FROM OPMGRM1 : MAINT640 IS LOGGED OFF
Example 3: Use the DEFACTN command to define an action to mask a line in the Operations Manager log upon matching the rule.
GOMCMD OPMGRM1 DEFACTN NAME ACT1 COMMAND 'CP MSG MAINT720 LINE MASKED!!' ENV LVM INPUT MSK
Ready; T=0.01/0.01 05:00:17
GOMCMD OPMGRM1 DEFRULE NAME RULE1 MATCH '*MACHINE*' ACTION ACT1 MASKNEXT 0
Ready; T=0.01/0.01 05:00:43
The Operations Manager log will contain the following.
08/22/22 05:02:20 GOMCMD0216L TS3159 "***********************************************************" VID=*MSG SRC=MASIUCV CLS=
08/22/22 05:02:20 GOMCMD0216L TS3159 "* -- Operations Manager Action ACT1 scheduled for execution -- *" VID=*MSG SRC=MASC
08/22/22 05:02:20 GOMCMD0216L TS3159 "08/22/22 05:02:20 GOMCMD0903I 0 SCHEDULE(S) DEFINED" VID=*MSG SRC=MASIUCV CLS=8
08/22/22 05:02:20 GOMCMD0216L TS3159 "08/22/22 05:02:20 GOMCMD0904I 2 ACTION(S) DEFINED" VID=*MSG SRC=MASIUCV CLS=8