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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


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