Operating System - OpenVMS
1753877 Members
7267 Online
108809 Solutions
New Discussion

Re: Search a string in files

 
SOLVED
Go to solution
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