A command rule begins with the CMDIN keyword followed by characters that identify a specific command or group of commands that cause the rule to execute. For example, a rule beginning with CMDIN(DRL) executes when CA Automation Point determines that a command starting with DRL is issued through CA Automation Point.
Command rules can also contain any of these rules keywords:
ALARM |
REXX |
ALARMSAY |
SCRIPT |
DOM |
SESSCMD |
DOSCMD |
SESSION |
EVERY |
SET |
LIMIT |
SUPPRESS |
MATCHLIM |
WHEN |
OSCMD |
WTO |
PPQWRITE |
WTXC |
REWORD |
XCCMD |
Command rules can be used when you issue a command from the red command area or from the Command dialog using the Automation Point Desktop, the Remote Viewer, or the Web Viewer.
Command rules do not execute if you enter the command directly in the session window. CA Automation Point checks the command rules, as well as the time rules, regardless of whether the session is configured as an automated session.
Note: You define a session to be automated by checking the Automate Session checkbox in the session definition.
In many instances, command rules and message rules are implemented similarly. However, two keywords, SUPPRESS and REWORD, have slightly different meanings in command rules than they do in message rules. See the descriptions of these keywords in the Command and Keyword Reference Guide.
Command rules let you suppress a command or allow operators to enter a pseudo-command from the command line and reword it as another command, without going into REXX mode. The command rule can also intercept the command and invoke a REXX routine or take other action as required.
Examples
CMDIN(STOP) WHEN(&WORD2 EQ 'OPSS' AND &USER NE '' AND &USER(1:9) NE 'SYSADMIN@') SUPPRESS WTXC(&USER is not authorized to remotely stop CA-OPS/MVS)
CMDIN(DRL), REWORD(D R, L, CN=(ALL))
CMDIN(SLIP0C1), REWORD(SLIP SET, ID=P0C1, COMP=0C1, A=SVCD, MATCHLIM=1, JOBNAME=TESTPGR, END)
CMDIN(PAGE), SUPPRESS, REXX(page.rex &WORD2), WTXC(Requested paging &WORD2)
CMDIN(START), SET (&LAST_START = &TIME &DATE), WTXC(Most Recent START issued at &LAST_START)
Copyright © 2012 CA. All rights reserved. |
|