The CMD-event definition section has the following format:
)CMD cmdverbspec
Adhere to the following guidelines when specifying the character string for the cmdverbspec:
For example, when writing a command rule that triggers whenever a z/OS DISPLAY command is issued, specify )CMD DISPLAY rather than )CMD D, or specify )CMD MODIFY rather than )CMD F to execute on z/OS modify commands. Although you must specify the full z/OS command verb in the event definition section of the rule, a command rule recognizes a command event if an operator issues a short form (alias) of the command. Additional logic can be implemented into the )PROC section of the rule to interrogate the CMD.TEXT event variable to see the exact command that was entered.
z/OS reissues such commands so that the processing occurs in the CONSOLE address space, thus causing a CMD rule to possibly execute twice. z/OS reissues DISPLAY ACTIVE commands and any other command that creates paged-frame display output on a z/OS console.
Use these guidelines when you are writing rules that respond to JES2 commands:
The CMD rule specifier needed to trap stacked JES2 commands is impacted by the type of issuing console (extended, MCS, SMCS, and so on). It is also impacted by the setting of the z/OS CMDDELIM parameter.
Use these guidelines when you are creating CMD rules to process JES2 stacked commands:
Each stacked JES2 command will trigger an associating unique CMD rule, or a wild card catch all JES2 CMD rule will be executed for each stacked command. In this example, a )CMD $* rule would execute three times (once for each command), a )CMD $P rule would execute once, a )CMD $T would execute once, and a )CMD $S rule would execute once.
The entire list of commands stacked together is treated as one command. This command is processed by either one CMD rule that processes all JES2 commands or a specific CMD rule that processes the first command within the list of stacked commands.
For example, a )CMD $* rule would execute once for the complete stacked command, or a )CMD $P rule would execute once for the complete stacked command. In both cases, additional rule logic to interrogate the value of the cmd.text environmental variable should be coded to process each command accordingly.
If you are attempting to process and automate various JES2 commands, it may be suitable to create a catch all JES2 rule that rejects command stacking. To implement this type of control logic, see the sample rule JESSTACK in the ops.sample data set.
When writing rules that respond to JES3 commands, begin the cmdverbspec event identifier string with the first character in the JESCHAR parameter string. Only the first character in JESCHAR is meaningful in a JES3 environment. When CA OPS/MVS processes a command on a JES3 system, it attempts to match the command prefix with one of the JES3 system or sysplex prefixes. If a match is found, CA OPS/MVS creates a common command verb (see CMD.VERB), regardless of which command prefix was used or whether the command was abbreviated. The purpose of this is to make sure that you have to write only a single command rule for each JES3 command, regardless of how it was issued.
The command verb (and CMD.VERB) consists of the real command verb with the original prefix stripped off and replaced by the first character in JESCHAR. This does not affect the command text itself, only the verb used to execute the rules. For example, assume you have the following:
JES3 SYN prefix = 8 JES3 PLEXSYN prefix = %% CA OPS/MVS JESCHAR parameter = *
When you issue the JES3 command 8I S, a rule with a command verb (CMD.VERB) of *INQUIRY is executed. CMD.TEXT will not be changed and remains 8I S (unless CMD.TEXT is changed by the rule itself). The same rule is executed if you issue the command %%I S; CMD.VERB will be the same as in the prior case but the CMD.TEXT will be %%I S.
The use of multiple system or sysplex command prefixes is fully supported by CA OPS/MVS, whether these prefixes are single- or multiple-character.
If your CMD rule needs to make decisions based on the original JES3 command prefix, then use the following three environmental variables:
Indicates the original command prefix
Set to 1 if the original JES3 command prefix is a system scope prefix (SYN)
Set to 1 if the original JES3 command prefix is defined as a sysplex scope prefix (PLEXSYN)
If you set JESCHAR to the same value on all your systems, one rule should be able to work on all your JES3 systems, regardless of what the SYN and PLEXSYN values are on those systems.
)CMD *INQUIRY )PROC if CMD.VERB ¬= '*INQUIRY' then return 'NOACTION'
Specify the command character followed by the wildcard character (*) to execute on commands issued using a product-defined command character. For example, assuming the character / is the command character of a particular subsystem, code a specification of )CMD /* to trigger on commands issued using its command character. Additional logic can be implemented in the )PROC section of the rule to interrogate the CMD.TEXT event variable to see the exact command that was entered.
|
Copyright © 2011 CA.
All rights reserved.
|
|