I have a simple VB dataset, from which I am trying to just select records. This should include records that have the value '002' in position 13(converted from 9 to 13 for VB file) and also it should exclude those '002' records which contain the values 'ECOC' or 'EPOC' in the position 151(converted from 147 to 151 for VB file).
I used many combinations of include statement, but the problem everytime is that, the second condition which should exlude values ECOC and EPOC is not hapening, if I have only coded exclusion of one value , for example 002 with ECOC, then its correct. It is not able to exclude both ECOC and EPOC at the same time.
Here is the code,
Code:
//SYSIN DD *
INCLUDE COND=((13,3,CH,EQ,C'002'),AND,
(151,4,CH,NE,C'ECOC',OR,
151,4,CH,NE,C'EPOC'))
SORT FIELDS=COPY
/*
//SYSIN DD *
INCLUDE COND=((13,3,CH,EQ,C'002'),AND, (151,4,CH,NE,C'ECOC',OR,
151,4,CH,NE,C'EPOC'))
SORT FIELDS=COPY
/*
I think I am going wrong with the precedence of operation here, hence I have tried almost all sorts of order, but none are giving me records with 002 and no ECOC or EPOC together.
Please let me know if you can point out the mistake.
I had chosen the paranthesis, thinking about the order of precedence of operation, but you are right that in this case anyways it is going to handle each record at a time and not a group. I haven't tried this one, but will do so.