This is a discussion on Re: Command fails in batch, seems to work at-ed interactively - VMS ; Doug Phillips wrote on 09/17/2007 06:43:36 PM: > On Sep 17, 11:45 am, norm.raph...@metso.com wrote: > > This code checks for an empty or blanked PostalZip field. > > When run inside the batch, is seems to give a different, ...
wrote on 09/17/2007 06:43:36 PM:
> On Sep 17, 11:45 am, norm.raph...@metso.com wrote:
> > This code checks for an empty or blanked PostalZip field.
> > When run inside the batch, is seems to give a different, incorrect
> > result then when the code is extracted to another procedure file
> > and run against the renamed data file.
> > In this case there is a match and Sever is "1".
> > In the nomatch case Sever is "3".
> > Here the "no strings matched" sets Sever to "3" indicating a wrong
> > result as there should have been a match.
> > Why would the same code fail to work and later work on the renamed
> > file. (The diff command is to eliminate the trailing spaces first.)
> > [OpenVMS Alpha V7.3-1]
> > === Actual log excerpt:
> > Sent file JAM317:[CM_PROD.DATA]FRONTIER_ATO.XML.1, 571384 bytes.
> > QUIT
> > <221
> > $@mfgcom:check_postal.com "JAM317:[CM_PROD.DATA]FRONTIER_ATO.XML;1;"
> > $!$ ffile="jamdata:FRONTIER_SHR.XML_2007090603045085;1"
> > $
> > $ if p1 .nes. "" then ffile="JAM317:[CM_PROD.DATA]FRONTIER_ATO.XML;1;"
> > $ pipe diff/igno=trail JAM317:[CM_PROD.DATA]FRONTIER_ATO.XML;1; nl:
> Is the semicolon ";" *after* the version (i.e. .XML;1 a posting typo
> or is it really in your command?
Thanks Doug. Thanks also to the others who continued this discussion
I read them all, just not until now. As I said initially and was
"(The diff command is to eliminate the trailing spaces first.) " This is
merely because the input records are 300 bytes, mostly trailing blanks,
while testing it was hard to read them on an 80-byte screen.
The problem is indeed the extra ";" and it was introduced as a typo in the
calling procedure, thusly: $@mfgcom:check_postal.com "''ifile;"
That obviously should read: $@mfgcom:check_postal.com "''ifile'"
Oddly it does not yield any error as the ";" acts as a delimiter and
DCL is (here, anyway) too forgiving. That goes for calling the error a
warning, also, as was stated in a later post.
$ type tryit.com
$ @mfgcom:check_postal.com "''ifile;"
$ @dcl_check.com0 tryit.com
-*- Charlie Hammond's unsupported DCL checker (Version V3.4) -*-
Checking file TRYIT.COM;1
Checking for DCL_CHECK$ logicals...
"DCL_CHECK$SUPPRESS_BL" = "TRUE"
"DCL_CHECK$SUPPRESS_CCN" = "TRUE"
"DCL_CHECK$SUPPRESS_CLD" = "TRUE"
"DCL_CHECK$SUPPRESS_LFF" = "TRUE"
"DCL_CHECK$SUPPRESS_LOD" = "TRUE"
Starting Pass 1 -- 18-SEP-2007 10:50:43.44 ...
Starting Pass 2 -- 18-SEP-2007 10:50:43.56 ...
Starting Pass 3 -- 18-SEP-2007 10:50:43.59 ...
Procedure contains: 2 total lines
2 code lines (including 0 lines (0%) w/ comments)
0 additional continuation lines
0 lines w/i $DECK/$EOD pairs
0 comment only lines (0% of code lines)
0 blank lines
LINE CODE --DIAGNOSTIC MESSAGE--
2 PSQ-W possible error using single-quote (') in quoted string
-*- END OF LISTING -*- 18-SEP-2007 10:50:44.20
Gives only a warning, also, but would have made me catch it if I
followed my own good processes when making the edit.
The pipe did hide the error in practice, and I did not go back far
enough to spot the error.
Thanks again for being my eyes. It had to be something like that.