Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to sum using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
svsarath

New User


Joined: 30 May 2006
Posts: 16

PostPosted: Sat Dec 26, 2009 2:06 am    Post subject: How to sum using SORT
Reply with quote

Hi,

Please help me on the following using SORT

Code:
Input:

Column#1 Column# 2
1               -50
2                10
1                10
2                20


Code:
Output:
1              -40
2               30
T

Thanks for your help.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat Dec 26, 2009 3:07 am    Post subject:
Reply with quote

Any chance that you could mention what sort product you are using, the record format and length, the field lengths, positions, and formats, just so we don't have to guess at everything. Any chance that you could search on previous posts?
Back to top
View user's profile Send private message
JnanaR

New User


Joined: 20 Jul 2009
Posts: 24
Location: Mumbai

PostPosted: Mon Dec 28, 2009 12:06 am    Post subject:
Reply with quote

sort fields=(position of column1,1,CH,A)
sum fields=(position of colum2,2,ZD)
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Dec 28, 2009 4:36 am    Post subject:
Reply with quote

Hello,

The posted code was not tested. . . It will not work as posted. . .

Quote:
Any chance that you could mention what sort product you are using, the record format and length, the field lengths, positions, and formats, just so we don't have to guess at everything. Any chance that you could search on previous posts?
Little to no chance. . .

I guess i'd forgotten that Christmas was supposed to be a Psychic Day. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Dec 28, 2009 6:57 pm    Post subject:
Reply with quote

With the information in hand, you may try something similar to what is suggested here.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us