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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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