Previous Top Next |
Replace Parameters |
The parameters file is optional. For completeness this tutorial uses a parameter file to replace a half dozen items in the script file. As stated earlier in the tutorial when a command file is run that includes a parameter file all occurrences of any parameter found in the script file are replaced by the value from the parameter file. This is a pure copy and paste. The modified script file is run but not saved. At the end of the run the script file is back to its original state complete with parameters.
This page describes the parameter substitution and mechanism for this example.
For the example the parameter file is called, Macro_Example.dat
It contains is as follows:
In our example each of the variables :<PR3FILE>,<MAXITERATIONS>,<Run Description>,<ANALSIS>,<CG-Heading>,<CG-Name> appears in the script file and is replaced by its value.
Functionally in the script these parameters control the following:
Lets see the effect using the second parameter<MAXITERATIONS> as an example.
The original line of script is:
FOR I = 0 TO <MAXITERATIONS>
The parameter file converts it to:
FOR I = 0 TO 2The line sets the loop to process 3 times for I looping from 0 through 2.
As an exercise scan through the script file and locate the other parameters and figure out what the script lines will become after the parameter substitutions.
Previous Top Next© 2015 Arrow Tech Associates |