Return to home pageGo to previous document on same levelGo to next document on same levelMove up one levelGo to sitemapmailto:dpwolfer@swissonline.ch

Using parameter tables

The statements in a macro usually have parameters that need to be assigned values. Parameter tables are scrollsheets in which macro parameters are represented by columns whose cells contain the actual values for the parameter. They allow a master macro to run a slave macro repeatedly with different sets of parameter values. When you let a parameter table control the execution of a slave macro, it is executed once for every row of parameter values in the table. This process is similar to using mail merge functions in a word processing program. You will create parameter tables in applications like MS Excel™ and then import them into Wintrack as scrollsheets for use with macros. This is how you create master and slave macros:

Master
[main]
table_file?slave col_a? col_b?
[end]
... Slave
[main]
command {1}
command {2}
[end]
  1. Create a master macro which in its [main] section calls a slave macro that you want to be controlled by the parameter table.
  2. In the macro call statement of the master-macro, type the file name of the parameter table in front of the name of the called macro. Separate it from the macro name by a question mark.
  3. In the same macro call statement, instead of parameter values, type the names of the columns of the parameter table that contain the corresponding parameter values. After each column name place a question mark.
  4. Create the slave macro which is to be called by the master macro. Use place holders for runtime parameter specification for all parameters that need to be controlled by the table.

    Parameter table

    col_a  col_b
       AA     BB
       CC     DD

    ...

    Slave, 1st call

    [main]
    command AA
    command BB
    [end] 

    Slave, 2nd call

    [main]
    command CC
    command DD
    [end]

    If you design the two macros following the rules shown above, the master macro will call the slave macro once for every line it finds in the parameter table, pick the parameter values from that line and pass them to the slave macro.

    {1}?slave_macro
       col_a? col_b? {2}

    In the master macro, you do not need to type the name of the parameter table file explicitly. You can use runtime specification or a macro dialog to specify its name. Moreover, you can mix the use of a parameter table with other methods of parameter specification for values that remain the same for every call of the slave macro.

Additional information...


Go to previous document on same levelGo to next document on same levelMove up one levelGo to sitemap