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
 

 

SUM Statement in the DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: SUM Statement in the DFSORT
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: 3158
Location: Tucson AZ

PostPosted: Sat Apr 07, 2007 4:29 am    Post subject:
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 Moderator


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

PostPosted: Sat Apr 07, 2007 4:38 am    Post subject:
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    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 ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm


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