Get count(always 1) on unique value (Combination of FL1 and FL2) and zero count for spaces at FL2 & next duplicate value (Combination of FL1 and FL2) from input file.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Mar 29, 2018 11:15 am Post subject:
guhanath,
If you need to zero out the duplicate records, then you NEED to SORT the data. By doing so, the order of the records is lost. If you don't need the same order of the input records, here are untested control cards that would give you a 4 byte counter value making the output file a length of 12
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Mar 30, 2018 10:39 am Post subject:
guhanath wrote:
Hi Kolusu,
Can i get this code in ICETOOL instead of SORT? I can use CTL1CNTL cards in that than SORT to re-sorting the records.
why do you need an ICETOOL code? You do realize that ICETOOL under the covers calls DFSORT? so what exactly are you trying to achieve ?
guhanath wrote:
How can i use KEYBEGIN suppose my input file is like below for the same output.
Please don't expect to be spoon fed. You got a working solution and if you atleast did some basic homework you would have figured it. Assuming you are a programmer , try to solve the issue programmatically. The simple thing to do is put the FLD1 and FLD3 as a combined field and then use the KEYBEGIN on the combined field. It is just a walk in the park. *sigh*
why do you need an ICETOOL code? You do realize that ICETOOL under the covers calls DFSORT? so what exactly are you trying to achieve ?
I would like to re-ordering the records by including SEQNUM while sorting the file. After i would like to sort the file on SEQNUM. To do this in ICETOOL i can use CTL1CTL cards instead of SORT. That's the reason i have asked for ICETOOL version.
Any how i have done this in ICETOOL and got the expected result. Thank you very much for the solution.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon Apr 02, 2018 11:32 am Post subject:
guhanath,
If your input file is only 13 bytes why make the temp dataset as 80 bytes? The resources required depends on the LRECL. Since you are doing 2 sorts, your goal should be reducing the resources required.
Also remove the DCB properties in the JCL. DFSORT will automatically calculate the LRECL and BLKSIZE based on the control cards or input file properties.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum