<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998) originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>MIDAS And the Host Operating System</TITLE> <META NAME="description" CONTENT="MIDAS And the Host Operating System"> <META NAME="keywords" CONTENT="vol1"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <LINK REL="STYLESHEET" HREF="vol1.css"> <LINK REL="next" HREF="node25.html"> <LINK REL="previous" HREF="node23.html"> <LINK REL="up" HREF="node22.html"> <LINK REL="next" HREF="node25.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html783" HREF="node25.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html779" HREF="node22.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html773" HREF="node23.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html781" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html782" HREF="node216.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="icons.gif/index_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html784" HREF="node25.html">MIDAS Data Structures</A> <B> Up:</B> <A NAME="tex2html780" HREF="node22.html">Monitor and Command Language</A> <B> Previous:</B> <A NAME="tex2html774" HREF="node23.html">Starting the MIDAS Monitor</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00620000000000000000"> </A><A NAME="1376"> </A> <A NAME="midas-and-the-Host-Operating-System"> </A> <BR> MIDAS And the Host Operating System </H1> <P> Care has been taken that MIDAS and the Host Operating System (DCL for VMS and Bourne or C-shell for Unix) co-exist smoothly and complement each other. Migration from one environment to the other is simple: <BR> <BR> If you are in the MIDAS environment, type <TT>BYE</TT> to switch back to the Host System. <BR> If you have returned to the host environment from a MIDAS session, (indicated by the $-prompt in VMS, and by $ or % in Unix), type <TT>GOMIDAS </TT> (in VMS) or <TT>gomidas</TT><A NAME="1381"> </A> (in Unix) to revive MIDAS. The status of the keywords and the command buffer of the stopped <BR> MIDAS session are preserved - if you want to start afresh, use <TT>INMIDAS</TT> (VMS) <BR> or <TT>inmidas</TT> (Unix) again. <BR> You may also use host commands directly inside MIDAS by preceding them with `<TT>$</TT>'. For instance, <BR> <TT>Midas 027> $DIR</TT> (in VMS) or <BR> <TT>Midas 027> $ls</TT> (in Unix) <BR> will display the contents of the current directory. <BR> Please, note, that currently this mode of operation will only invoke Bourne shell<A NAME="1387"> </A> commands in Unix, not C-shell or Kornshell commands. To execute C-shell (or any other Shell) commands you have to insert them in a Bourne shell script which has as the first line: <IMG WIDTH="24" HEIGHT="41" ALIGN="MIDDLE" BORDER="0" SRC="img14.gif" ALT="$\char93 $"><TT>! /bin/csh</TT>, or <IMG WIDTH="23" HEIGHT="41" ALIGN="MIDDLE" BORDER="0" SRC="img15.gif" ALT="$\char93 $"><TT>! /bin/ksh</TT>, etc. <BR> <BLOCKQUOTE> <DIV ALIGN="CENTER"> <B>Note</DIV> <I>If you work on a VMS system, beware of DCL command procedures: <BR> DCL modifies command I/O streams when executing a procedure. This causes problems for the interprocess communication inside MIDAS. When executing a DCL procedure via <TT>$ @</TT> `procedure' the correct settings will be maintained inside MIDAS. <BR> However assigning a symbol <TT>MIMI</TT> to the command above and then executing the DCL procedure by just typing <TT>$ MIMI</TT> will lead to disaster from which only a <TT>BYE</TT> and subsequent <TT>GOMIDAS</TT> will get you going again.</I></B></BLOCKQUOTE> <BR> Since images, tables, etc. are standard disk files, all host commands related to file operations can be employed. However, if a MIDAS catalog<A NAME="1397"> </A> is used, care has to be taken that the information in the catalog is not invalidated, when e.g. renaming or deleting data files outside MIDAS (i.e. using commands of the host file system directly). <P> The output<A NAME="1398"> </A> from MIDAS commands can be redirected to ASCII files enabling easy combination of MIDAS and host commands. E.g. <BR> <TT>Midas 123> READ/DESCR myimage * </TT>><TT>dsc.dat </TT> <BR> will send all the output from the <TT>READ/DESCR</TT> command to the ASCII file <I>dsc.dat</I> (created in your current work directory) which can then be used by any host command. For example, <BR> <TT>Midas 124> $EDIT dsc.dat</TT> (in VMS) or <BR> <TT>Midas 124> $vi dsc.dat</TT> (in Unix)<BLOCKQUOTE> <DIV ALIGN="CENTER"> <B>Note</DIV> <I>This mechanism is pretty much like the one used in Unix with the exception that there should be <I>no</I> space between the </I></B>><B><I> and the output file name. Furthermore, this output redirection also works on VMS.</I></B></BLOCKQUOTE><TT>Midas 125> STATISTICS/IMAGE myimage </TT>><TT>dsc.dat </TT> <BR> always creates a new file <TT>dsc.dat</TT>, if you want to append data to an existing ASCII file use <BR> <TT>Midas 126> STATISTICS/IMAGE myimage </TT>>><TT>dsc.dat </TT> <BR> instead. <BR> Finally, <BR> <TT>Midas 126> STATISTICS/IMAGE myimage </TT>><TT>Null </TT> <BR> will suppress the output. If the keyword <TT>LOG(12) = 0</TT> (the default), the suppressed output is still written to the Midas logfile; if <TT>LOG(12) = -1</TT>, also the logging is suppressed. <BR> As you may have guessed already, there is also input redirection. E.g. <BR> <TT>Midas 127> $ls a*.bdf </TT>><TT>dscin.dat</TT> <BR> <TT>Midas 128> READ/DESCR </TT><<TT>dscin.dat </TT> <BR> will display the standard descriptors of all Midas images with names beginning with the letter `a' in the current directory. <BR> Again there should be no space between < and the file name. <BR> See also the subsection <A HREF="node36.html#output-redirection">3.4.5</A> for more info about I/O redirection. <BR> <BR> On a Unix system you can connect MIDAS and Unix command via the <I>pipe</I> symbol <A NAME="1417"> </A>, e.g. <BR> <TT>Midas 129> READ/DESCR myimage * </TT>|<TT> $grep NGC425 </TT> <BR> <TT>Midas 130> $ls a*.bdf </TT>|<TT> read/descr</TT> <BR> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html783" HREF="node25.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html779" HREF="node22.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html773" HREF="node23.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html781" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html782" HREF="node216.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="icons.gif/index_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html784" HREF="node25.html">MIDAS Data Structures</A> <B> Up:</B> <A NAME="tex2html780" HREF="node22.html">Monitor and Command Language</A> <B> Previous:</B> <A NAME="tex2html774" HREF="node23.html">Starting the MIDAS Monitor</A> <!--End of Navigation Panel--> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-09</I> </ADDRESS> </BODY> </HTML>