W dniu 30.07.2021 o 17:45, Radoslaw Skorupka pisze:
W dniu 30.07.2021 o 17:33, Paul Gilmartin pisze:
On Fri, 30 Jul 2021 09:54:51 -0500, Mike Schwab wrote:

Try 5 pairs of conditions?
INCLUDE COND=((5,4,CH,EQ,C'0205',AND,83,3,CH,EQ,C'YES'),
OR,(5,4,CH,EQ,C'0205',AND,88,3,CH,EQ,C'YES'),
OR,(5,4,CH,EQ,C'0205',AND,93,3,CH,EQ,C'YES'),
OR,(5,4,CH,EQ,C'0205',AND,98,3,CH,EQ,C'YES'),
OR,(5,4,CH,EQ,C'0102',AND,28,7,CH,NE,C'USE    '))

What's DFSORT's operator precedence?  Was it necessary to bracket the
conjunctions in order that they have higher precedence than
the alternations?

Are you just rewriting Radoslaw's expression according to the Distributive Law?
Does DFSORTT not recognize the Distributive Law?

1. Operator precedence. According to documentation AND is first. However parenthesis should change it and it is allow to use as many parenthesis as needed.

2. DFSORT should recognize the law (Rozdzielność działań in Polish)

3. I found another mystery, which seems to be APARable:

The following statement gives several test records as expected:
INCLUDE COND=(5,4,CH,EQ,C'0205',AND,(83,3,CH,EQ,C'YES',OR,
                                     88,3,CH,EQ,C'YES',OR,
                                     93,3,CH,EQ,C'YES',OR,
                                     98,3,CH,EQ,C'YES'))

But this statement gives zero records. Note, I added "OR" conditions, so it cannot narrow the output.
INCLUDE COND=(5,4,CH,EQ,C'0205',AND,(83,3,CH,EQ,C'YES',OR,
                                     88,3,CH,EQ,C'YES',OR,
                                     93,3,CH,EQ,C'YES',OR,
                                     99,3,CH,EQ,C'YES',OR,
                                    103,3,CH,EQ,C'YES',OR,
                                    113,3,CH,EQ,C'YES'))


"The truth is out there"
The above example work properly with OPTION VLSCMP
And in fact my previous examples should have VLSCMP, not VLSHRT.
And for 0102 record I misunderstood (not very clear) documentation - the field length is NOT fixed, so blank characters after 'USE' were my wrong assumption.

Thank you all gentlemen for help.
And special thanks to Sri Hari for the solution and explanation.


Regards
--
Radoslaw Skorupka
Lodz, Poland

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to