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

How to Sort, sum 3 different fields in a row with Key?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subramanianup
Warnings : 1

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Wed Jul 04, 2007 2:55 pm
Reply with quote

I need to sort, sum file for following specifications


Input file

0002111112222233333
0024001200022200025
0020222220440000070
0002111112222233333
0020222220000000060

First 4 chars is Key and next every 5 chars are different fields
Key F1 F2 F3
0002 11111 22222 33333


I need to Sort the records by key and SUM by F1 , F2, F3

Can anyone help how to do the above Sorting
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jul 04, 2007 2:59 pm
Reply with quote

subramanian,

Code:

  OPTION ZDPRINT
  SORT FIELDS=(1,4,CH,A)
  SUM FIELDS=(5,5,ZD,
      10,5,ZD,
      15,5,ZD)
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top