koehler@eisner.nospam.encompasserve.org (Bob Koehler) wrote on 09/17/2007
05:01:13 PM:

> In article > 005C1937@metso.com>, norm.raphael@metso.com writes:
> > $ pipe diff/igno=trail JAM317:[CM_PROD.DATA]FRONTIER_ATO.XML;1; nl:
> > /nonumb | -
> > sear sys$pipe ""/window=(0,6)/mat=or/exact/nonumb |

> > sear sys$pipe "" /exact/nonumb | -
> > sear sys$pipe "> ","><"/exact/out=nl:
> > %SEARCH-I-NOMATCHES, no strings matched
> > $ sever=$severity

> Note the -I- in the message. The severity is 1, just like it is for
> a match.

No. Here is the -I- status

%SEARCH-I-NOMATCHES, no strings matched
$ stat=$status
$ show sym stat
STAT = "%X18D78053"

It ends in 3 which is the severity for informationals.

Here is the matches-found status

$ stat=$status
$ show sym stat
STAT = "%X10000001"

It ends in 1 which is the severity for successful.

(The others are 0 = warning
2 = error
4 = fatal (or severe) error
These are all even.

" status-code

" Defines a numeric value for the reserved global symbol $STATUS.
You can specify the status-code parameter as an integer or an
expression equivalent to an integer value. The value can be
tested by the next outer command level. The low-order 3 bits
of the value determine the value of the global symbol $SEVERITY.

" If you specify a status code, DCL interprets the code as a
condition code. Note that even numeric values produce warning,
error, and fatal error messages, and that odd numeric values
produce either no message or a success or informational message.
If you do not specify a status code, the current value of $STATUS
is saved. When control returns to the outer command level,
$STATUS contains the status of the most recently executed command
or program."

Nevertheless, I can submit this against the renamed file
and get the severity 1 $severity of the $status shown.
That does not explain why the original run against the
unrenamed file got "no strings matched" and thus a
status other than that.

I'm going to retry the original, but this is not the
first time this has occurred.

It is a puzzlement.

Only a file not found (or protected against your reading it)
> are likely to return any other severity and you already parsed to

> a file which does exist.
> You need to check $status which contains the whole message code. The
> message id part of the code is different for match and no match.