The other solution is to prepare a flat file (or xls,...) with 2 column (VAR_NAME, VAR_VALUE) and proceed with following script:
Let RowCount = NumMax(NoOfRows('RPT_VARS'),0)-1;
For i=0 to '$(RowCount)'
Let TempVarName = peek('VAR_NAME',$(i),'RPT_VARS');
Let TempVarValue = peek('VAR_VALUE',$(i),'RPT_VARS');
Let $(TempVarName) = '$(TempVarValue)';
I don't know if there would be performance issue, but (if I am not wrong) the include feature imposes that we follow QV syntax (such as):
SET company=ABC Corp;
My purpose with the include is exactly that, that is, chaging the already existing variables in the script, to get localized number/date/money formats, even month names. I may have missed the actual requirement, though.
Syntax for QlikView has to be respected, so yes, the plain text in the Include case must contain script. Include doesn't do only for variables, but for any piece of script you want to load from an external file.
Anyway, my guess is that performance of the include variable is always better than the other, because, at the end of the day, what you are doing is the same, but by means of a loop (slower), and eventually it does
LET TempVarName = TempVarValue;
what is, if you take a look at the code, what is already wirtten in the Include file. So why not doing it directly?
Again, if I missed the point just ignore the post.