Batch Files

Running a "batch file" according to IDL is something different than a "batch file" on  one of the big machines such as arno.nist.gov.

Batch file in IDL
 IDL Batch File from the Unix Shell
Batch File on Arno


A batch file in IDL is essentially a script.  Here's an example

Instead of entering the IDL environment, then compiling, and finally executing, you can set up a "batch" or "script" to do it for you.  To do this: make a text file that contains the commands you would type at the IDL prompt, such as:

.rnew testcode.pro
testcode
exit
Name the script something convenient such as "dotestcode."

To run the script, first enter the IDL environment (i.e., type idl at the unix prompt), then type:

@dotestcode
If you are going to also use a separate procedure, such as the one for drawing X and Y error bars, your script might look like:
.compile xyoerr.pro
.rnew xy.pro
xy
exit

IDL Batch File from the Unix Shell

This is similar to the batch file in IDL, but it will call IDL straight from the UNIX shell and feed the IDL commands in after IDL has been launched.

Here are the contents of a sample script, named dotestcode:

#!/bin/sh
idl <<!here
.rnew align.pro
align
!here
exit
In case you're not familar with scripts, you'll have to make the script executable before you run it for the first time.  To do this type in the Unix shell:
chmod +x dotestcode


Batch File on Arno

Please go to the Arno help for this.