File: README.HAO

package info (click to toggle)
hercules 3.05-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,520 kB
  • ctags: 16,438
  • sloc: ansic: 147,777; sh: 8,775; makefile: 737; perl: 202; sed: 16
file content (97 lines) | stat: -rw-r--r-- 4,240 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97


                     Hercules Automatic Operator


The Hercules Automatic Operator (HAO) feature is a facility that allows one
to automatically issue panel commands in response to certain messages being
issued.

To use the Hercules Automatic Operator facility, one first defines a "rule"
consisting of a "target" and an associated "command". The "target" is just
a regular expression pattern used to match against the text of the various
messages that Hercules issues as it runs. Whenever a match is found, the
rule "fires" and its associated command is automatically issued.

The Hercules Automatic Operator facility is ONLY for those messages issued
BY HERCULES to its HMC (hardware console). It CANNOT be used for whatever
messages the guest operating system may issue to any of its terminals. It
is only a HERCULES automatic operator and NOT a "VSE", "MVS", "VM", etc,
automatic operator!


                           Defining a Rule


To define a HAO rule, enter the command:

   hao <tgt>

to define the rule's "target" match pattern (a simple regular expression),
followed by the command:

   hao <cmd>

to define the rule's associated panel-command.

The target pattern is a simple regular expression value as defined by
whatever regular expression support your supported host build platform happens
to support. For Windows it must be a Perl Compatible Regular Expression (PCRE).
For other supported build platforms it might be some other supported regular
expression syntax. Check your host platform's programming documentation for
further details.

The associated panel-command <cmd> is whatever valid Hercules command you
wish to issue in response to a message being issued that matches the given
pattern (target). (Okay, that's not completely true. The "command" is actually
any text string one desires. It doesn't have to be a valid Hercules command,
but it makes infinitely more sense if it is one).


                     Other commands and limitations


To delete a fully or partially defined HAO rule, first use the 'hao list'
command to list all of the defined (or partially defined) rules, and then use
the 'hao del <nnn>' command to delete the specific rule identified by 'nnn'.
(All rules are assigned numbers as they are defined and are thus identified
by their numeric value). Optionally, one may delete ALL defined or partially
defined rules by issuing the command 'hao clear'.

The current implementation limits the total number of defined rules to 10. If
you need to define more than 10 rules you will either have to build Hercules
for yourself (increasing the value of the HAO_MAXRULE constant in hao.c) or
else beg one of the Hercules developers to please do it for you.

Note that there is currently no way to define a command whose arguments varies
based on actual message text. That is to say, there is currently no way to say

   "Reply with the command 'devinit <cuu> filename'
   in response to message text 'HHCXXnnnI Device 'cuu'
   intervention required.' where 'cuu' is whatever cuu
    was identified in the message."

The HAO is *not* that sophisticated (yet). Only simple plain-text commands may
be defined and issued. No automatic substitution is done based on message text
(although normal 'DEFSYM' symbol substitution *is* supported however, as that
is a normal panel-command feature supported separately from the HAO). This may
possibly change in the future however, depending on user need/demand.

ALL defined rules are checked for a match each time Hercules issues a message.
There is no way to specify "stop processing subsequent rules". If a message is
issued that matches two or more rules, each associated command is then issued
in sequence. Thus the advice to choose your rules' target patterns carefully
very much applies here.


                      Giving credit where credit is due


The Hercules Automatic Operator facility was designed eons ago (or so it seems
anyway) by Bernard van der Helm of Noordwijkerhout, The Netherlands, and is
thus copyrighted by him. All I did was FINALLY get around to implementing it
in the current release of Hercules. If you like it and find it to be useful,
I think it'd be real nice if you'd let Bernard know that. Thanks.

-- Fish
Sep 25, 2006