next up previous contents index
Next: Execution of Commands Up: Command Syntax Previous: On--Line Help

Output Redirection in Midas

 

Different ways exist to save the output of a MIDAS command in an ASCII file besides just using the logfile. There is a set of PRINT/... commands to print out the contents of the different MIDAS data objects, e.g. PRINT/TABLE. By default the output from these commands is sent to a printer but this can be changed to a file via the ASSIGN/PRINT command. So, if you want an ASCII copy of a MIDAS table, you do:
Midas 088> ASSIGN/PRINT file mytable.dat
Midas 089> PRINT/TABLE mytable

Another possibility which is applicable to all MIDAS commands, not just the PRINT commands, is to specify the output file directly in the command. Thus,
Midas 089> WRITE/TABLE mytable >mytable.dat
is equivalent to the two commands above. The file mytable.dat is created in the current directory. If you want to append the data to an existing file, use
Midas 089> WRITE/TABLE mytable >>mytable.dat
In case, the output should go to a file and also be displayed in the MIDAS command window, use
Midas 089> WRITE/TABLE mytable >mytable.dat,term

This output redirection scheme has been modeled after the way it is done in Unix but it also works on VMS systems.



Pascal Ballester
Fri Mar 24 17:17:52 MET 1995