title: How Can I Run a Nonlinear Regression Macro in Minitab (simple syntax error)?
body: <p>I'm new to scripting Minitab 17 and have run into a snag that I can't find any documentation for, including an error message that brings up no hits on Google. All I want to do is generate macros that perform simple nonlinear regressions automatically, all of which execute just fine in the GUI or through Session Commmands. If I follow the directions on p. 10 of the Minitab Macros documentation and copy the commands I've successfully run from the 
  Project Manager/History folder, copy them into a .MAC file and surround them with GMACRO and ENDMACRO commands, I end up with the code below:</p>
  
  <pre><code>GMACRO
  NLinear;
    Response 'MyColumn1';
    Continuous 'MyOtherColumn2';
    Parameter "Theta1" 0.5;
    Parameter "Theta2" 0.2;
    Expectation Theta1 * ln (MyOtherColumn2 - Theta2 );
    NoDefault;
    TMethod;
    TStarting;
    TConstraints;
    TEquation;
    TParameters;
    TSummary;
    TPredictions.
  ENDMACRO
  </code></pre>
  
  <p>The code between the MACRO statements runs OK from the GUI or as a Session Command. When I run the resulting macro file from the session prompt in Minitab, however, I invariably receive the following error: "Arguments not allowed in all global macro mode." I also receive syntax errors for every column that includes quote marks, even though that is standard session window syntax; I can eliminate these by substituting the column heading from my open worksheet, such as "C1", but can't get past the other error. </p>
  
  <p>I'm obviously using some kind of incorrect syntax element(s) but can't pin them down - does anyone have any ideas? There are plenty of instructional materials on Minitab macros on the Web, but I haven't yet encountered any that deal with either this particular error or that delve much into how to execute ordinary Minitab tests of this kind. My goal is merely to write batch files that will do all my nonlinear regressions on off-hours etc. Thanks in advance.</p>