Could not find anything on my particular problem during a search. Have a problem during a SEARCH ALL on a mainframe.
Want to do something like this:
But get an error:
Is there are ideas around this? I really need to check the condition inside the ( ) also, and would like to check it once, or am I going to have to do a SEARCH ALL 4 times, one for each of my 4 WS fields (WS-VALID-NUMxx)?
Want to do something like this:
Code:
SEARCH ALL WS-TBL
AT END
SET WS-NOT-FND-ON-LIST TO TRUE
WHEN WS-TABLE-NUM(WS-INDX) EQUAL WS-CHECK-NUM
AND WS-TABLE-SUFF(WS-INDX) EQUAL WS-CHECK-SUF
AND (WS-TABLE-ACCT(WS-INDX) EQUAL WS-VALID-NUM1 OR
WS-TABLE-ACCT(WS-INDX) EQUAL WS-VALID-NUM1 OR
WS-TABLE-ACCT(WS-INDX) EQUAL WS-VALID-NUME2 OR
WS-TABLE-ACCT(WS-INDX) EQUAL WS-VALID-NUME2)
SET WS-DOC-FND-ON-LIST TO TRUE
END-SEARCH.
Code:
2398 IGYPS2051-S "(" WAS FOUND IN A "WHEN" PHRASE OF A "SEARCH ALL" STATEMENT. THE "SEARCH ALL" STATEMENT WAS DISCARDED.
Is there are ideas around this? I really need to check the condition inside the ( ) also, and would like to check it once, or am I going to have to do a SEARCH ALL 4 times, one for each of my 4 WS fields (WS-VALID-NUMxx)?