HP Guardian User Manual page 80

Hide thumbs Also See for Guardian:
Table of Contents

Advertisement

Defining Function Keys and Writing Macros
Writing a Macro Definition
You create macro definitions similar to the way you create alias definitions. A macro
definition can invoke multiple commands and can include specific command arguments
and dummy arguments for which you specify values when you use the defined key.
To create macro definitions, use the MYKEYS file again. Begin each function-key
definition with the ?SECTION command, and specify the definition type as MACRO.
You can also add comments using the COMMENT command, braces ({ }), and double
equal signs (==).
Including Command Arguments
In a macro definition, you can include command arguments using two methods:
Include the specific argument in the definition.
For example, the STATUS command can take the argument *, TERM. Therefore,
your MYKEYS file could define function key F6:
?SECTION F6 MACRO
STATUS *, TERM
COMMENT Info about processes at this terminal
Include a dummy argument for each variable.
You can include a dummy argument for each variable in the command. A dummy
argument is a number surrounded by percent signs (such as %1%, %2%, and %3%).
Then, before you press the function key, type the actual values for each variable on
the TACL command line.
The dummy arguments in this TFORM command are replaced by the real values
that you specify before you press F7:
?SECTION F7 MACRO
TFORM / IN %1%, OUT $S.#%2%, NOWAIT /
This macro definition contains all constant elements in the TFORM command,
which are the run-option keywords IN, OUT, and NOWAIT, the first part of the
spooler location ($S), and all required punctuation (forward slashes, commas, and
the pound sign). The two dummy arguments (%1% and %2%) represent the
variables, a file name and spooler location , which you enter when you use F7.
The dummy argument %*% represents any number of arguments that you supply.
You must also include any required punctuation. For example, you can define the
STATUS command using the %*% argument:
?SECTION F1 MACRO
STATUS %*%
To enter a STATUS *, TERM command using a key with this definition, enter:
15> *, TERM
and press F1.
Guardian User's Guide —425266-001
5 -4
Creating a Library File for Your Function Keys

Advertisement

Table of Contents
loading

Table of Contents