McIDAS User's Guide
Version 2011.1
[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]
Runs commands serially from a text file.
BATCH file [keywords]
BATCH par1 par2 . . parn file [keywords]
name of the batch file containing the commands; see the Remarks |
|
value to substitute wherever the corresponding %n notation (%1, %2, etc.) appears in the batch file |
The batch file containing the commands must be in text format, created with a text editor. Commands in the batch file may be up to 512 characters long. Commands are performed serially; each must finish before the next one begins.
Normal string table substitution may be used within each command and will take place as the command is run. Use the TERM command to change the state of the single letter command toggles.
To add a remark in the batch file, specify REM or REM? followed by one or more spaces and the remark text. The letters (REM) must be uppercase and must begin in column 1. Remarks prefaced by REM? are echoed to the text frame.
BATCH also allows for some rudimentary flow control by permitting the following eight pseudocommands in the batch file. The term value in the formats below may be up to 512 characters, and is one of the following:
This pseudocommand replaces the value of the variable, which is only available while the BATCH command is running. Reference the variable elsewhere in the batch file by using %variable% or #variable. If variable is not defined with SET, it is obtained from the McIDAS string table. You can define and use up to 30 variables, which are simply names storing strings of characters. Variable names may be up to eight alphanumeric characters.
This pseudocommand replaces the value of string in the McIDAS string table.
This pseudocommand runs the specified command if the two values are identical.
This pseudocommand runs the specified command if the two values are NOT identical.
This pseudocommand runs the specified command if the last McIDAS command completed successfully. (That is, it returned a zero exit status.)
This pseudocommand runs the specified command if the last McIDAS command had an error. (That is, returned a non-zero exit status.)
This pseudocommand causes the BATCH command to jump forward to the next line tagged with :label. See the :label pseudocommand below.
This pseudocommand tags a line with a label so that it can be found with the GOTO pseudocommand. The label is a character string of up to 12 characters (for example, DONE!). You can add a comment after the label as long as one or more spaces separate the label and comment.
BATCH KMIA 0 6 LIST.BAT
If your BATCH file, LIST.BAT, contains the line below, this entry runs the McIDAS command SFCLIST KMIA TIME=0 6.
SFCLIST %1 TIME=%2 %3 |
BATCH KTUL DISPLAY.BAT CONTINUE=YES
If your BATCH file, DISPLAY.BAT, contains the lines below, this entry sets the value of the variable ID to KTUL for use in the IMGDISP and PC commands. If station KTUL is in the image, it is displayed with a high resolution map, then the cursor is moved to the station location. If the image doesn't exist or station KTUL isn't in it, the message *** OOPS! Station must be invalid or not on image *** appears on text frame.
[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]