Book Image

Minitab Cookbook

By : Isaac A Newton
Book Image

Minitab Cookbook

By: Isaac A Newton

Overview of this book

Table of Contents (19 chapters)
Minitab Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Local macros with subcommands, submacros, and control statements


This recipe will create a complicated macro using control statements and subcommands on the main macro command.

The following macro will be able to accept any number of columns on the main command line and generate a layout for each column. Specifications can be optional; they can be entered as a column or a single value. We will use a column for the specifications to allow different specifications for each column of data, or a constant to use the same specification for each column. The macro will be able to choose between the layout with or without specifications and perform an error check to see if the right number of specifications have been entered. This will cover several nested IF statements and DO loops.

Finally, we will copy the Llayout macro from the previous recipe into Notepad twice and edit this macro to create two submacros. One will be used to generate a layout for specifications and we will edit the other to create...