October 1, 1979 COMMAND MACROS CREATION
MACROS -- EXAMPLES
11.2.1.5 Additional Macro Examples __________________________________
Example _______:
Consider the macro:
SA
T &115
RET
This macro will TYPE a specified number of lines and then RETURN
the display to the position before the TYPE was performed. If no
parameter is specified in invoking this macro or if the parameter
is left null the number of lines typed defaults to 15.
Example _______:
If, instead, the macro had been specified as:
SA
T &1
RET
then leaving out the parameter would result in an error message
and none of the three commands in the macro would be executed. If
the parameter were left null the commands would be executed, but
an error would occur because TYPE has a required parameter. For
example, consider a macro which retrieves a file, locates a
pattern at the end of the format code macro definitions (to make
sure they are all defined) and then travels to a particular
Decimal Block. This might be written as:
g/&1&r'Filename?'
l/!.end of macros
gdl/&2&r'Decimal Block#?'
If &1 or &2 are not specified when the macro is invoked, the
message "Filename?" or "Decimal Block#?" will be printed when that
line in the macro is reached.
FRESS Resource Manual Release 9.1 FRESS RSection 7.2 -- 255
October 1, 1979 COMMAND MACROS MACRO LIBRARIES
11.2.2 MACRO LIBRARIES ______________________
Command macros must be contained in a macro library (<maclib>).
Notes _____
<maclib>s may contain any number of Command Macro definitions.
The name of the system Command Macro library is "FMAC". If the
will not user names a <maclib> "FMAC", the system <maclib> ________ be
invoked.
not All <maclib> functions must be executed in CMS and ___ the CMS
must reside on the A-disk Subset or FRESS and the <maclib> _________________________.
11.2.2.1 Editing Functions for <maclib> Manipulation ____________________________________________________
The following four <maclib> editing functions must be used to
up to 10 macros create and modify <maclib>s. Each can manipulate _______________
(<cmac>) in or out of one <maclib>.


FMACADD <maclib> <cmac1> [<cmac2>...]


The specified MEMO files are added to <maclib>. If <maclib>
did not previously exist it will be created. If <maclib>
already contained a copy of any of the specified macros
ignored those particular "adds" will be _______. All MEMO files
which are successfully added to <maclib> will be erased.


FMACDEL <maclib> <cmac1> [<cmac2>...]


The specified macros are deleted from <maclib>. Unlike
FMACSPLT, no MEMO file is created.
256 -- Section 7 Release 9.1 FRESS Resource Manual
Previous Page Next Page