![HP Guardian Скачать руководство пользователя страница 80](http://html.mh-extra.com/html/hp/guardian/guardian_user-manual_165061080.webp)
Defining Function Keys and Writing Macros
Guardian User’s Guide — 425266-001
5 -4
Creating a Library File for Your Function Keys
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
Страница 24: ...About This Guide Guardian User s Guide 425266 001 xxii Your Comments Invited ...
Страница 30: ...Part I Using the Compaq Tandem Advanced Command Language TACL Guardian User s Guide 425266 001 ...
Страница 100: ...Part II Managing Files Using the File Utility Program FUP Guardian User s Guide 425266 001 ...
Страница 146: ...Part III Managing Disk and Tape Processes Guardian User s Guide 425266 001 ...
Страница 232: ...Backing Up and Restoring Disk Information Guardian User s Guide 425266 001 11 26 Backcopy Examples ...
Страница 234: ...Part IV Using the Spooler and Its Utilities Guardian User s Guide 425266 001 ...
Страница 248: ...Introduction to the Spooler Guardian User s Guide 425266 001 12 14 Sending Output to a SPOOL DEFINE ...
Страница 300: ...Performing Routine Spooler Operations Using Spoolcom Guardian User s Guide 425266 001 14 38 Problem Solving Summary ...
Страница 322: ...Part V Security Features and Other Guardian Utilities Guardian User s Guide 425266 001 ...
Страница 368: ...Monitoring Event Messages Guardian User s Guide 425266 001 17 14 Using the Event Viewer ...
Страница 378: ...Displaying Version and System Information Guardian User s Guide 425266 001 18 10 Task 2 Interpret SYSINFO Output ...
Страница 410: ...Monitoring Hardware Components Guardian User s Guide 425266 001 19 32 Automating System Monitoring ...
Страница 460: ...Index Guardian User s Guide 425266 001 Index 24 Special Characters ...