[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020628: McIDAS: Problems with BATCH



>From: Arlene Laing <address@hidden>
>Organization: USF
>Keywords: 200206281857.g5SIvBu14828 McIDAS BATCH

Arlene,

I must have just missed your call.

>May I disturb you for a moment, please?  Hope all is better with your
>eye.

It is almost 100% back to normal, thanks.

>Anyway, one of my students is having a problem running batch files.
>
>Batch files with IMGDISP commands work but batch files with SFCPLOT
>and PTDISP will not work (nothing is displayed).  The same commands work
>when typed at the command line (everything is displayed) but will not work
>when run as a batch file.

This sounds very strange.  Is the BATCH file being run from a McIDAS-X
session, or from a script.

>We think that it may have something to do with changes in his file
>permissions since I can run the same batch files from my account.  

Can his McIDAS-X session see the batch file(s).  Let's suppose that
the name of one of the files is TEST.BAT.  What does the following
produce in his account:

DMAP TEST.BAT

If his session can see the BATCH file, the next thing to check is if
his account can read the BATCH file.  Next try:

SEE TEST.BAT

If is session can read the file, it should be able to execute the
commands in the file.  What does the output form the BATCH command
look like?

Another thing.  The default operation for BATCH is to exit upon
any failure of any command.  This feature can be overwridden with
the CONTINUE=YES keyword sequence on the command line:

BATCH CONTINUE=YES TEST.BAT

Perhaps one of the first commands that is trying to be run is failing?

What if the BATCH file is trying to plot to a frame that does not
exist in his session?  For instance, what if the BATCH file is telling
SFCPLOT to plot in frame 15 and his session only has 10 frames.  This
would cause an execution error, and the default exit strategy of BATCH
would kick in.

>Shelly is not here today so we are not sure what she may
>have changed lately.  Can you think of any reasons why he would have this
>problem and, perhaps, find a solution?

Any of the above.  What would help is the output he sees when he tries
to run the BATCH command(s).

>Thanks much,

Sorry I was down the hall when the phone rang.

Tom

>From address@hidden Fri Jun 28 13:29:40 2002
>cc: address@hidden,
>   Narvekar Narayan <address@hidden>
>Subject: Re: 20020628: McIDAS: Problems with BATCH 

>Hi Tom,
>
>Thanks for the prompt response.  Here's what happened when we ran the 
>commands that you suggested:
>
>--------START LOG OF BATCH PROBLEMS ------------------
>
>
>DMAP test.bat
>PERM      SIZE LAST CHANGED FILENAME DIRECTORY
>---- --------- ------------ -------- ---------
>-rw-        24 Jun 28 14:51 test.bat /home/nnarvek/mcidas/data
>24 bytes in 1 files
>SEE test.bat
>IMGDISP RTIMAGES/GE-IR.1
>SEE: Done...EOF Encountered.
>BATCH CONTINUE=YES test.bat
>BATCH: Error reading file /home/nnarvek/mcidas/data/BATCH
>BATCH: BATCH done /home/nnarvek/mcidas/data/BATCH
>
>___________END LOG OF BATCH PROBLEMS-------
>
>
>That last line is a little bizarre.  It seems that mcidas does not know
>what the BATCH command means.
>
>By the way, when we run the same command at the McIDAS command line it
>worked.
>
>IMGDISP RTIMAGES/GE-IR.1
>Beginning Image Data transfer, bytes= 515056
>IMGDISP: loaded frame  1
>IMGDISP: done
>
>Any ideas?
>
>Thanks much.
>
>Arlene

The problem turned out to be internal format of the batch file that
was being run.  The file was created with the Windows NotePad, and
it did not have a new line at the end of the line in the test.bat file.
Once the file was edited and saved with vi, everything worked.