Invoking a Local Macro
1 From a command prompt in the
session window, enter the percentage symbol % followed by the macro file
name, as in %TRIM. Also consider
the following issues:
· The
default file name extension for local macros is MAC. When you invoke a
macro that has an extension of MAC, you only need to type the file name,
as in %TRIM. If the extension is not MAC, you must type the file name
and extension, as in %TRIM.TXT.
· When
you invoke a local macro, by default Minitab looks for that macro file
first in the current folder, then in the \MACROS subfolder. If the
macro is not in one of those default folders, you can specify the
folder by including a path when you invoke the macro. For example,
%C:\SALES\TRIM.
· If
a local macro file name includes spaces, put the name in single quotes,
as in %'a
very long file name.MAC'
2 After the file name, type any
undetermined arguments which belong with the main command:
· Unnamed
columns, constants, and matrices are not surrounded by quotes, as in %TRIM C1 K2
· Named
columns, constants, and matrices are surrounded by single quotes, as in
%TRIM 'Sales' 'NewMean'
· Text strings, such as titles or file names, are
surrounded by double quotes, as in %TRIM C1 K2;TITLE "Results";
STOREIN "OUTPUT.TXT".
3 If the macro has optional subcommands,
consider typing them as in interactive Minitab, ending each line with
a semicolon or a period, as in %TRIM C1
K2;PERCENT 4.