That "lrecl" is a nice thing. I can' do that, as I don't have DFSORT 2.1, which greatly extended the places where a symbol could be used. It adds one unnecessary byte, but a small price to pay in this type of situation.
Didn't see this post at first. Yes, I agree. A small price to pay. Would be fantastic if we could have calculations in symbols..
Bill, the last comma in your code makes me wonder where to put it exactly, because last group would be right before OUTFIL - thus the comma shouldn't be there?
In the mean time, I also worked a little more and got something working. I know it's not the best but I believe it's easier to debug and understand what is being done if you use multiple steps. I know Bill would not agree but that would be me doing it ;-)
1. Identify Even/Odd.
2. ICETOOL Step: Run this step 2 times using Even and Odd file separately. You'll get 2 output files (one from each run):
Could you please try this one as well with your different Inputs to see if it works? I am just curious to know whether the approach fetched me the right results
.
Your 2) is a long way round. You can just do a JOINKEYS with JNFnCNTL files. The SKIPREC gives the same effect as starting the sequence from 0/1 for the different files.
Then the point of you running it twice is for the odd and the even. So with the odd/even embedded in the file, it comes back to the JOINKEYS.
Everything in your 3) can be done in the Main Task of a JOINKEYS. So you have the two JNFnCNTLs, the two JOINKEYS, and the Main Task with SORT and OUTREC.
Not sure how that makes it more complicated :-)
Sure, I've had to change mine twice, but that's because I pickled it in the first place...
@Bill: When I first looked at your earlier posts, I thought it would be complicated and I would not be able to achieve it. But then, somehow, I got some courage to try more on that to get to the above post of mine.
You have already given the solution but since I had also put some efforts, I want Claes to say it is also working and make me feel happy about it :-)