8.69 HAO (Hercules Automatic Operator)

8.69.1 Function

The Hercules Automatic operator (HAO) feature is a facility that allows to automatically issue console
commands in response to certain messages being issued. To use the HAO facility it is necessary to de-
fine a rule, consisting of a target and an associated command.

The Hercules Automatic Operator is only for those messages issued by Hercules to its console. It cannot
be used for messages issued from the guest operating system.

The current implementation limits the total number of defined rules to 64. There is currently no way to
define a command whose arguments varies based on actual message text. All of the defined rules are
checked for a match each time Hercules issues a message, there is no way at this time to stop the pro-
cessing of subsequent rules.

8.69.2 Syntax

Descriptive

HAO command [operands]


where command

target

consolecmd

nn

nn]

Diagram

Êʬ¬¬ HAO ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ


where command


target ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«

consolecmd ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«

nn ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«

¬¬ ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«

¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«



nn

8.69.3 Parameter

TGT

This is the keyword to define a new rule (pattern).

target

Specifies the rule (pattern) to react on. The target is a regular expression pattern
which is matched against the text of the messages that Hercules issues.

CMD

This is the keyword to specify a command for a previously defined rule.

consolecmd

Specifies the command to be executed if a target rule matches. The associated
command must be a valid Hercules console command.

LIST

List all rules/commands or list only rule/command at index nn.

DEL

Delete rule and command at index nn.

nn

Number of the index to be listed or deleted.

CLEAR

Specifies to delete all defined rules. This stops the Automatic Operator.

8.69.4 Examples

Example 1:

Define target rule: Check for message HHC01600E ("Unknown Hercules command").

HHC00013I Herc command: 'hao tgt hhc01600e'

HHC00077I The 'target' was placed at index 0

Figure 138: HAO command (define target rule).

Example 2:

Define command for target rule: Issue "?" command (List all valid commands).

HHC00013I Herc command: 'hao cmd help'

HHC00077I The 'command' was placed at index 0

Figure 139: HAO command (define command)

Previous Page Next Page