Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Search a string in files

 
SOLVED
Go to solution
Highlighted
John Gillings
Honored Contributor

Re: Search a string in files

Don,

Also, instead of parsing for MATCH/NOMATCH, use $STATUS, or even better $SEVERITY :

$ PIPE SEARCH files string >NL: 2>NL:
$ sev=$SEVERITY
$ IF sev.EQ.1
$ THEN
$ code if matched
$ ELSE IF sev.EQ.3
$ THEN
$ code if not matched
$ ELSE
$ code for error
$ ENDIF
$ ENDIF

A crucible of informative mistakes