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 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 Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm

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