Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us