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 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 OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am

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