Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
This would work fine with DFSORT. With DFSORT, you can use about 2700 such conditions in an INCLUDE statement. (And you can use DFSORT's IFTHEN function along with OUTFIL INCLUDE to handle a much larger number of conditions.) Note that there's virtually no limit to the number of "cards" you can use with DFSORT.
However, the "EXCESS CARDS" message indicates you're using Syncsort, not DFSORT, so I can't help you.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
sasi.palani wrote:
hai in an ordinary sort card u can use a maximum of 8 cond
go for dfsort or syncsort.
rgds
shashi
Where did you get the idea that the maximum is 8 conditions? As I said in my earlier post, DFSORT can handle thousands of conditions. Please don't post incorrect information!
I have a very similar requirement.. I am trying to sort using more than 6000 INCLUDE conditions. I have used IFTHEN clause , I get the message ICE151A 1 TOO MANY *INREC IFTHEN 1 CONDITIONS .
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can get use just over 2000 conditions of the form p,6,CH,EQ,C'string', so you'll need to break up your INREC into multiple IFTHENs using the technique shown in the Programmer Response for message ICE151A:
Alternatively, depending on what exactly you're trying to do, you might be able to do it using the matching functions of DFSORT/ICETOOL's SELECT or SPLICE operator.
Yours was a wonderful solution. It is working for us.
We used to do it using SPLICE earlier but realized that SPLICE was taking time for two reasons - we need to copy the input file to an intermediate dataset ( ours is a huge input file) and moreover SPLICE interanlly sorts the records but actually we dont need to sort the file , we just need to filter them based on the policy list. So we decided to opt for having the condtions coded in the parm.