Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
I must admit that I initially thought that, but somewhere in the back of my mind I sort of recalled something about multiple search options.
Quote:
Find a field value within a constant. For example, you can search the character constant C'J69,L92,J82' for the value in a 3-byte field. If the field value is C'J69', C'L92', or C'J82', the relational condition is true; if the field value is C'X24', the relational condition is false. Note that the comma is used within the constant to separate the valid 3-character values; any character that will not appear in the field value can be used as a separator in the constant.
But the way I understand this, is that you can specify multiple options to be searched for in one place, rather than multiple OR statements.
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(1032,3,EQ,C'3CR',AND,9,3,EQ,C'AGE,ARX,ATE,AUG,A5D,A75,*
*
A5D,A75,N4Q,YCM,0BA,118,5YV,3CR'),FORMAT=SS
*
WER251A INCLUDE/OMIT INVALID FORMAT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
we did not give as separately since it has 800 value in the cond caluse, we have some 8000 OR statements. Please suggest me to give in the single line.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
You can do the kind of thing you want with INCLUDE and OR in Synsort.
I've not been able to find the limit on the number of ORs you may use in a single execution. I suspect it is below 8000.
If this was my requirement, i'd read the 8000 values into an array (making sure the values were in sequence) then read the input data file and do a binary search on the 8000 entry array. I'd keep the records i want and skip the others. As time goes by, the list of values could be updated, but no code would need to change as nothing would be hard-coded.
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
Hi Subrat,
Hopefully you've noticed the date of last post of this thread, just before your post. If you will search around you will found there are many other live discussons going on, you'll enjoy there rather..