MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
maxisnowhere Beginner Joined: 25 May 2005 Posts: 59 Topics: 20
Posted: Fri Sep 29, 2006 6:53 am Post subject: Sort + Sum problems
Hi Guys,
hope not to repeat an old question, I've searched but not found...javascript:emoticon(' ')
Rolling Eyes
I have a file like:
Code:
AA 10.30
BB 200.50
AA 1000.00
BB 30.70
and I would like to obtain:
AA 1010.30
BB 231.20
I would like to use the SORT with the SUM, but I can't sum those decimal numbers. Can somebody help me?(' ')
Thank' s a lot!!
Max
_________________ Maxisnowhere
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Sep 29, 2006 7:14 am Post subject:
maxisnowhere ,
Try this job
Code:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AA 10.30
BB 200.50
AA 1000.00
BB 30.70
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,2,CH,A)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,2,
TRAILER3=(1,2,X,TOT=(4,7,UFF,EDIT=(IIIIIIT.TT))))
/*
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
maxisnowhere Beginner Joined: 25 May 2005 Posts: 59 Topics: 20
Posted: Fri Sep 29, 2006 7:23 am Post subject:
Thank's a lot!!
Bye Maxisnowhere _________________ Maxisnowhere
Back to top
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