Page 1 of 1

Can't you use NE in an include statement?

PostPosted: Fri Sep 19, 2008 8:48 pm
by iebfr14
In the code below I assumed the NE would screen out the records with the values 176 and 286. However it included them in the output along with all the records that did not have the 176 and 286 value I intended to exclude. I got the desired results by switching to an OMIT and using EQ to screen out the undesired records but wanted to know why the NE in the include statement did not work.

INCLUDE COND=(44,3,CH,NE,C'176',OR,44,3,CH,NE,C'286',OR,
01,1,CH,EQ,C'T') This still included records with the 176 and 286 values even though the NE for them was coded.


omit COND=(44,3,CH,EQ,C'176',OR,44,3,CH,EQ,C'286') this did screen out the undesired recs.

Re: Can't you use NE in an include statement?

PostPosted: Fri Sep 19, 2008 9:21 pm
by Alissa Margulies
In the INCLUDE statement, change the OR to an AND between the first 2 conditions. That should give you the desired results.