Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
Posted: Wed Feb 27, 2008 7:16 am Post subject: Doubt in SUM FIELDS
Is it possible in a sort card with SUM FIELDS=(something), the number of summed fields
for Examples
This is the input file
Code:
A10
B11
C01
A03
B05
I'm using this control card
Code:
SORT FIELDS=(1,1,CH,A)
SUM FIELDS=(2,2,ZD)
So I would get the output as
Code:
A13
B16
C01
But how do I find the number of items summed up? for eg. for A 2 items were summed up. For B 2 items were summed up and for C 1 item was summed up. How do I find this? _________________ Thanks
Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
Posted: Wed Feb 27, 2008 11:08 am Post subject:
Thanks Kolusu,
Padding an extra 1 and then summing with that was the logic I had worked out previously but wanted to know if there was a direct method to find out the number of summed fields.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Feb 27, 2008 12:13 pm Post subject:
edkir98 wrote:
Thanks Kolusu,
Padding an extra 1 and then summing with that was the logic I had worked out previously but wanted to know if there was a direct method to find out the number of summed fields.
Thanks for the help.
edkir98,
What exactly do you mean direct ? The first solution with sections and trailer is indeed a direct method. _________________ Kolusu
www.linkedin.com/in/kolusu
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