A good approach is to use a file (CSV format = comma delimited
variables) to save and then read the material numbers. You can use the Windows temp directory
"&%[temp]" (=environment variable temp) as file location. Variables are possible.
However, if you want to avoid files, I would
prefer CopyText to add the material numbers to a long text (kept in memory). But
files are better, since in case of system failures the file can be read again,
but variables or long texts are lost. It might be necessary to write a second file while reading the
material numbers in order to be able to restart the process without
redoing everything all over again.