Loading your macro definitions – HP NonStop G-Series User Manual

Page 86

Advertising
background image

Defining Function Keys and Writing Macros

Guardian User’s Guide 425266-001

5- 10

Using a Library File

You can add as many alias and macro definitions to this file as you like. You can use
dummy arguments, including %*%, in your macro definitions just as you do when
defining function keys.

These examples include both alias and macro definitions:

?SECTION TED MACRO
TEDIT %*%

?SECTION H MACRO
#OUTPUT Displaying your command history
HISTORY

?SECTION F MACRO
FILEINFO %*%

?SECTION W ALIAS
WHO

?SECTION T MACRO
TFORM / IN %1%, OUT $S.#%2%, NOWAIT /

?SECTION MYINFO MACRO
#OUTPUT Executing the STATUS, WHO, and FILES commands
STATUS *, TERM
WHO
FILES

The T macro definition invokes TFORM with two arguments. The first argument is the
input text file; the second argument is the spooler location for the output. For example,
to run TFORM on a file named INFILE and send the output to the location LAZER:

The MYINFO macro definition contains a sequence of commands. When you invoke
this definition, TACL executes the STATUS, WHO, and FILES commands.

The H and MYINFO macro definitions use the #OUTPUT built-in function to display a
message before executing their respective commands.

Loading Your Macro Definitions

After you create your library file of macro definitions, you load the file into TACL
memory with the LOAD command or the #LOAD built-in function (like how you load
your function-key library file):

10> T INFILE LAZER

10> LOAD / KEEP 1 / MYMACS

Loaded from $GERT.STEIN.MYMACS:

P FN ED H F W T INFO

Advertising
This manual is related to the following products: