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

SUM Statement in the DFSORT


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

New User


Joined: 15 Sep 2005
Posts: 17

PostPosted: Sat Apr 07, 2007 4:16 am
Reply with quote

Hi,
I have the i/p file as

Code:

num  sal    date
A0150000  010107
A0210000  010107
A0145000  020107
A02 7000  020107


I need the output as

Code:

numsal
A0195000
A0217000



I need to do this with SORT.

Can you tell me whether this below sort card will work?

Code:

    SORT FIELDS = (1,3,CH,A)
    SUM FIELDS = (4,5)
    OUTREC FIELDS =(1:1,3,4:4,5)
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Apr 07, 2007 4:29 am
Reply with quote

Without looking it up in the sort manual, it looks roughly right, how does it run?
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: Sat Apr 07, 2007 4:38 am
Reply with quote

Quote:
Can you tell me whether this below sort card will work?


No, they won't, but these DFSORT control statements will:

Code:

  OPTION ZDPRINT               
  SORT FIELDS=(1,3,CH,A)       
  SUM FIELDS=(4,5,ZD)         
  OUTREC FIELDS=(1:1,3,4:4,5) 
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top