[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20000921: McIDAS BATCHes
- Subject: 20000921: McIDAS BATCHes
- Date: Thu, 21 Sep 2000 14:46:50 -0600
>From: Anthony James Wimmers <address@hidden>
>Organization: UVa
>Keywords: 200009212035.e8LKZTb26352 McIDAS BATCH
Tony,
>How do I avoid this error with a path and filename of this kind:
>
>BATCH TOPSEA 1 024 00 "/q4/TOPSE/v5eta2/pvarchive.bat CONTINUE=YES
>BATCH: Error reading file /q4/TOPSE/v5eta2/pvarchive.bat CONTINUE=YES
>BATCH: BATCH done /q4/TOPSE/v5eta2/pvarchive.bat CONTINUE=YES
This should be:
BATCH TOPSEA 1 024 00 CONTINUE=YES "/q4/TOPSE/v5eta2/pvarchive.bat
In McIDAS, the quote field must always come last, and keyword parameters
must come after positional parameters.
Tom
>From address@hidden Thu Sep 21 15:11:50 2000
>Subject: 20000921: McIDAS BATCHes (cont.)
>Then I suggest you change the helpfile:
>
>BATCH -- Runs McIDAS commands serially from a text file
>
> BATCH file <keywords>
>
> BATCH par1 par2 ... parn file <keywords>
No, because the following should also work:
BATCH TOPSEA 1 024 00 /q4/TOPSE/v5eta2/pvarchive.bat CONTINUE=YES
In this case, the BATCH file is specified as a positional parameter,
not as the quote field which must always come last, and the keyword
still comes after the positionals.
The help could perhaps be better written as:
BATCH -- Runs McIDAS commands serially from a text file
BATCH file <keywords>
BATCH par1 par2 ... parn file <keywords>
BATCH par1 par2 ... parn <keywords> "file
The last syntax is how BATCH ran historically. The previous two are
things that were added in 7.3 (or so), and they were intended to get
away from quote fields in commands.
>(I don't mean to sound huffy about it. I just wanted you to know.)
No huffiness taken.
Tom
>From address@hidden Thu Sep 21 15:52:51 2000
>Subject: 20000921: McIDAS BATCHes (cont.)
Tony,
re: No, because the following should also work:
BATCH TOPSEA 1 024 00 /q4/TOPSE/v5eta2/pvarchive.bat CONTINUE=YES
>I had already tried that, and it doesn't work, because the path/filename
>is too long:
>
>BATCH TOPSEA 1 024 00 /q4/TOPSE/v5eta2/pvarchive.bat CONTINUE=YES
>BATCH:
>BATCH: 5th positional argument is too big -->
>/q4/TOPSE/v5eta2/pvarchive.bat
>BATCH: Must be character string of no more than 12 chars.
>BATCH:
>BATCH:
Hmm... The concept at work here (not mine, by the way) is that the BATCH
file will be found by virtue of either MCPATH or REDIRECT. In this case,
the name follows the "time honored" (old and outdated ;-) 8.3 naming
convention. For instance, if you did the following:
REDIRECT ADD *.bat "/q4/TOPSE/v5eta2
or more specifically
REDIRECT ADD pvarchive.bat "/q4/TOPSE/v5eta2
or if your MCPATH had /q4/TOPSE/v5eta2 in it then this would work:
BATCH TOPSEA 1 024 00 pvarchive.bat CONTINUE=YES
IF the batch file name, pvarchive.bat, were shortened to match the 8.3
convention.
>I wish that wasn't a problem, but it is.
I see the code "mistake" in batch.pgm right off. It looks like someone
started to add the necessary code to support arbitrarily long 'file'
names, but didn't finish the job. You could modify batch.pgm to allow
long file names as follows:
change:
CHARACTER*(MAXPATHLENGTH) CFILE
CHARACTER*(MAXPATHLENGTH) OUTFIL
to:
CHARACTER*(MAXPATHLENGTH) CFILE
CHARACTER*(MAXPATHLENGTH) CTEXT ! <<<<< UPC mod 20000921 >>>>>
CHARACTER*(MAXPATHLENGTH) OUTFIL
and:
CALL CQFLD(A)
IF (A(1:1).EQ.'"') THEN
B=A(2:)
C---------Account for redirection
IVAL=VOLNAM(B,CFILE)
MPARAM=0
ELSE
mparam = mccmdnum(" ")
CC=CPP(mparam,' ')
C----------Account for redirection
IVAL=VOLNAM(CC,CFILE)
ENDIF
to:
CALL CQFLD(A)
IF (A(1:1).EQ.'"') THEN
B=A(2:)
C---------Account for redirection
IVAL=VOLNAM(B,CFILE)
MPARAM=0
ELSE
mparam = mccmdnum(" ")
c CC=CPP(mparam,' ') ! <<<<< UPC remove 20000921 >>>>>
iret=mccmdstr(' ',mparam,' ',ctext) ! <<<<< UPC add 20000921 >>>>>
C----------Account for redirection
c IVAL=VOLNAM(CC,CFILE) ! <<<<< UPC remove 20000921 >>>>>
ival=volnam(ctext,cfile) ! <<<<< UPC add 20000921 >>>>>
ENDIF
and then rebuild the batch.k executable:
make batch.k
I am looking at the ramifications of this right now, so it might show up
in my 7.70 release. I also see that the file that is specifiable in the
DEV= keyword needs to be arbitrarily long also.
Tom