1 Add three lines to your Exec file: GMACRO as the first line, ENDMACRO as the last line, and the template (the macro name) as the second line of the file.
2 Check for Minitab commands that work differently in %macros (below).
3 Save the macro as a text file, with the extension MAC.
Once you have converted your Exec to a global macro, you can incorporate any of the features documented in the chapters for global macros such as DO-loops and IF statements. You can also include several global macros within one global macro file.
Local macros do not support the CK capability, which is a specialized looping feature exclusive to Execs. If your Exec uses the CK syntax, replace the syntax with the appropriate control statement .
- If the command reads data from a file, you must modify the command so that the file name is listed with a FILE subcommand, rather than being listed on the main command line.
- If the command is followed by data, you must include the statement END at the end of the data, on its own line.
- If the command is followed by a FORMAT subcommand followed by data, the END statement must begin at the beginning of the line. If END is indented at all, Minitab will not recognize it and you will get an error message.