× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 23-Feb-2012 15:35 , dmosley@xxxxxxxxxx wrote:
I've encountered similar problems, but we resolved it by
doing the reverse, of O-ALL to S-ALL.

Try this.

A CODEV I SST(DOCODE 1 2)
A K RRAKCN
A K RRAKYR
A K RRAKTY
A K RRAKNO
A O STATUS COMP(EQ 'X')
A O CODEV COMP(NE 'EV')
A S ALL

"Shannon ODonnell" on 02/23/2012 06:17 PM wrote:
Did not work. Here's the actual code. It's still pulling in
everything, not just where my CODEV (derived field) = 'EV'

<<SNIP>>
A S STATUS COMP(NE 'X')
A S CODEV COMP(EQ 'EV')
<<SNIP>>


Perhaps in thought the resolution was by reverse logic [for each of the "OR"ed Select comparisons in the prior message], but possibly only because the *OR is appropriate, when thinking about what to Omit versus what to Select.? While the given omit logic is presumably correct for what the OP wants, the important aspect for defining the proper Select logic in the DDS is knowing what determines [i.e. how to specify] "AND" and what determines "OR" between the specifications.

_i Select/omit field name i_
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakb/selectomit.htm
"
You use select/omit fields to tell the operating system how to select or omit records when your program retrieves them using this record format.
...
When using the select/omit fields, specify either S or O in position 17. By specifying either S or O, the select and omit comparison statements are joined by OR. The system treats the select and omit comparison statements that are joined by OR independently from one another. That is, if the select or omit comparison condition is met, the record is either selected or omitted. If the condition is not met, the system proceeds to the next comparison.

By specifying a blank in position 17, the select and omit comparison statements are joined by AND. The combined comparisons must be met before the record is selected or omitted.
...
"

The "Omit" logic in the "15:35" message will Select:

*NOT ( (STATUS *EQ 'X') *OR (CODEV *NE 'EV') )

That is the equivalent of the following "Select" [and probably the desired] logic:

(STATUS *NE 'X') *AND (CODEV *EQ 'EV')

However, note that the logic that "Did not work" was:

(STATUS *NE 'X') *OR (CODEV *EQ 'EV')

That logic which "Did not work" would include all "EV" for CODEV irrespective of the value of STATUS, and would include all non-"X" STATUS values irrespective of the value of CODEV... thus including many unwanted records [though not necessarily "everything"] rather than only those records where "CODEV (derived field) = 'EV'".

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.