Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Ambili S,
I understood your initial requirement and Kolusu's reply on that.
It's quite obvious that Kolusu's solution is for DFSORT and if you're a Syncsort user as your topic title suggests, it may not work for you because DFSORT has added a lot more to their version of JOIN than what Syncsort JOIN had originally.
Ambili S wrote:
I wanted to try using ICETOOL'S WHEN=GROUP option .
I wanted to include the 1st 4 chars in col 85 for records in same group and a seq num for each record. Then sort on the seq num and col 85 , 4
Now are you trying for an alternative solution or is it a totally new requirement?
btw KEYBEGIN is a DFSORT feature which came into existence in Oct 2010. AFAIK Syncsort supports PUSH and WHEN=GROUP, but NOT KEYBEGIN as of today.
So you need to explain clearly what you're trying to achieve here.
All i wanted to know was if the result can be achieved using any option other than JOINKEYS . Also i am not very clear on the JOINKEYS option mentioned above.
What i understood here is , INB file has '00000001' from 81 position. Then REFORMAT is done and the summation. But when i try the above jcl it says , REFORMAT OUT OF RANGE. So i tried increasing the LRECL if INB to 88 and it worked.
But still not clear as to how the SUM is working .
Also if you could suggest me some other alternative it would be really helpful.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
If you don't want to use the feature implemented to do things like this, you could always write a bit of (cobol?) code to do what you want. . .
It also appears that you have posted only part of what you are submitting. You need to post the entire sort step (jcl and control statements). Also post the informatoinal output from an execution of this complete set of info.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
What i understood here is , INB file has '00000001' from 81 position. Then REFORMAT is done and the summation. But when i try the above jcl it says , REFORMAT OUT OF RANGE. So i tried increasing the LRECL if INB to 88 and it worked.
But still not clear as to how the SUM is working .
You dont seem to understand that what you're trying to execute is not available to you. A DFSORT solution may not work for a Syncsort user. DFSORT and Syncsort and competitive sort products.
Here the logic is simple. INB is padded with '00000001' at the end and summed on key to find the count of records for each key, Then the JOIN is performed to overlay the count next to each record in the input file. Finally SORT is performed to sort the records in descending order of the 'count'.