> How about {&temptablename}.fieldname?
>
> It is in a regular expression like:
> "IF {&temptablename}.fieldname EQ YES THEN DO: " ...
Typically, you would use these as substitutions in an include file where you want to use the same, or similar, processing for different temp-tables or database tables.
So, you might have an include file {process.i} that might have a line such as:
IF {&temptablename}.{&fieldname} EQ YES THEN run process.p ("{&temptablename}", rowid ({&temptablename}).
So, you would call the include file in the following way, perhaps:
{process.i &temptablename="t_table1" &fieldname="processable"}
which would check to see if temp-table t_table1 has the processable flag set, if so it would run the external program and pass the rowid to the program.
You might use &if to check whether the temp-table or variable variables have been set and are valid.
&if "{&temptablename}" <> "" and "{&fieldname}" <> "" &then
IF {&temptablename}.{&fieldname} EQ YES THEN run process.p ("{&temptablename}", rowid ({&temptablename}).
&endif
This would only fire up if &temptablename and &fieldname were not blank.
You would probably use this if you had an include file that took various arguments and did various things depending on the parameters passed to it. In certain circumstances, the parameters passed to the include file might be blank and hence might otherwise cause a syntax error. The include file would be found in a number of different programs.