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 group up similar records and sum two fields ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
brganeshbabu

New User


Joined: 23 Jun 2005
Posts: 34
Location: Chennai

PostPosted: Mon Oct 12, 2009 10:27 am    Post subject: How to group up similar records and sum two fields ?
Reply with quote

Hi,
I want to sum up similar records and sum up two numeric fields (ZD). Below is the screen shot of my input file. Could you please help me in this.

Code:
----5----+----6----+----7----+----8----+----9----+--
***** Top of Data **********************************
04042010015301007350444544      -720.00      -252.00
04042010015301007350444544      1800.00       630.00
04042010015301007350444544     -1080.00      -378.00
04372010920309000228444544     26100.00      9135.00
04372010920309000228444544    -26100.00     -9135.00
04542070015301009040444544    -33600.00    -11760.00
Code'd

Please copy & paste the above file in notepad to get the correct view. I want to sort fields from 1 to 42. If they are similar, the value from 72 to 84 and 85 to 97 (both amount fields).
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Oct 12, 2009 8:46 pm    Post subject:
Reply with quote

What is the RECFM and LRECL of the input file?

Please show the expected output for your input example.
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 Oct 12, 2009 11:07 pm    Post subject:
Reply with quote

Hello,

Quote:
Please copy & paste the above file in notepad to get the correct view
Unnecessary. . . You need to learn to use the "Code" tag icon_wink.gif
Refer to your original post - it has been "Code"d. . .
Back to top
View user's profile Send private message
brganeshbabu

New User


Joined: 23 Jun 2005
Posts: 34
Location: Chennai

PostPosted: Tue Oct 13, 2009 10:14 am    Post subject:
Reply with quote

My Record Format is FB and LRECL=97

Dick,
Thanks for the info about "Code"
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 13, 2009 9:04 pm    Post subject:
Reply with quote

Again:

Quote:
Please show the expected output for your input example.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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