IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to group up similar records and sum two fields ?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Oct 12, 2009 8:46 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 12, 2009 11:07 pm
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
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 Developer


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

PostPosted: Tue Oct 13, 2009 9:04 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top