Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us