Dear Martin,
many thanks for the reply!
I tried your method, but it doesn't work for me.
I made a config file matrixconf.tnt with
set matrixnamebase $basematrix ;
proc / ;
then pass its name from inside the main script to the script which actually does the analyses:
var: matrixconfigname[32] ;
set matrixconfigname $matrixconf.tnt ;
run work_script.run $(matrixconfigname) ;
(it is redundant here, but I have many files, so I need to test a principle, as there will be a different config file for each matrix)
Then, in
work_script.run:
var: matrixnamebase[32] logfname[32] ...etc. ;
proc %1 ;
proc $(matrixnamebase).tnt ;
work_script.run apparently reads the config file correctly but fails to assign the value to matrixnamebase set in the config file. So at line "proc $(matrixnamebase).tnt ;" TNT displays an error "Can't open file .tnt", because variable matrixnamebase remains undefined.
work_script also correctly reads the matrix itself at line "proc %1" if it is passed to it instead of the config file, but, again, I can't get the filename out of %1 (even though it is technically a string) to create different strings for other files... The transfer of setting the hard variables to the matrix file has similarly no effect.
I guess I'll have to use extremely standardized filenames inside a loop, but that's a pity.