Previous Topic: Writing Message Rules

Next Topic: Enabling a Rules File


Writing Command Rules

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