Often it is necessary to process a large number of files using the same sequence of data analysis operations. This task is made much easier through ``macro'' files and the RUN SEQUENCE command. Here macros are designed to do the simple job of inputting data from one file, and outputting it in another (although the output file can be missing).
To create the macro file perform the following steps:
The macro is now ready to be run.
The macro can be run repeatedly on a series of files by using the RUN SEQUENCE command. See Section 6.1, Page for details of allowable file series. The macro file to run is selected, as are the first and last files in the series. The ``increment'' between input file is input. Files in a series must be named with a changing numerical part. This is automatically recognised and the first and last numbers in the series defined. To process every file between these numbers (assuming the files exist) enter 1 (or -1 in the case that the last file has a larger number than the first). To skip alternate files enter 2 (or -2), and so on. If for some reason all the files have an extra 0 after the changing numerical part e.g. they are numbered file_10.dat, file_20.dat, file_30.dat, etc. enter 10.
The RUN SEQUENCE command will automatically generate the input file names from this information, and they will replace the #IN ``variable'' which has been placed within the macro.
If the macro defines an output file using the #OUT ``variable'', then the command will also generate the series of output file names. These are the same as the input file names, but with a user specified extension replacing any extension of the input files. The last user input before the macro is automatically run is OUTPUT FILE EXTENSION which is the output file extension used to form the output file names. The generated output file names automatically replace the #OUT ``variable'' each time the macro is run in the sequence.
The progress of the macro is output in the terminal window.