Command (CMD) events

Command events control client/server access to the mainframe.

When the Data Virtualization Manager server receives a command from a z/OSĀ® console, a rule is scheduled to run. The console can be a physical console or extended software, such as System Display and Search Facility (SDSF) or CA OPS/MVS Event Management and Automation. The command consists of a command verb, followed by optional operands. The command verb string is matched against enabled CMD rules to find the rule to run.

CMD rules perform the following tasks:
  • Examine the command, parse the operands, and perform necessary actions, such as read and set product parameters. This allows parameters to be displayed and changed from the z/OS console.

  • Access and update REXX global variables.

  • Use REXX SAY statement to communicate with the console that entered the command. All output from the SAY statement is routed to the console that entered the original command. This allows ASO products to communicate with, interrogate the status, and control the Data Virtualization Manager server.
    Note: Because CMD rules can access and update any part of the product, you must control who can create, enable, and disable CMD rules.

All CMD rule processing is done by IBM Data Virtualization Manager for z/OS/REXX. Processing in another programming language is not supported.

Syntax

To trigger a CMD rule, use the z/OS STOP or MODIFY command, or use a z/OS command that specifies the subsystem name. The following commands are valid:
  • MODIFY xVZy, command text

  • xVZy command text

  • xVZy, command text

where xVZy is a specific instance of the Data Virtualization Manager server, which is identified by the subsystem name that was assigned during installation.

When the z/OS STOP command triggers a CMD rule, the rule can control or reject product shutdown. The criterion of the rule must be STOP or a less specific criterion that matches the STOP command. The z/OS STOP (P) command can also trigger a CMD rule that has the matching criterion of STOP.

Header statement

A CMD criterion is a string of 1 - 30 characters. To schedule the rule to run for all commands, use a single * (asterisk) as the criterion. Use a trailing * (asterisk) as a wildcard character.

Use the following format for the header statement:
/*CMD criterion

Process section

A REXX process section is required.

Return values

The following table lists the return values for CMD rules:
Return value Action
None supplied If the rule runs a RETURN command, the Data Virtualization Manager server sends a return code that indicates the successful completion of the rule.
ACCEPT The command in the rule was successfully completed.
REJECT The command in the rule was rejected. To specify why the command was rejected, you REXX SAY statements.
The return value for a STOP CMD rule determines how the Data Virtualization Manager server terminates. The following return values are valid:
Return value Action
None supplied Termination is allowed to continue.
ACCEPT Termination is not allowed to continue.
REJECT Termination is not allowed to continue.

CMD event variables

Values for these variables are set only when a CMD rule processes a CMD event.

Variable Contents Data type
CMD.TEXT Operands that are entered after the command name at the console. Character, read-only
CMD.VERB The command name that is entered at the console. Character, read-only