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 Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am

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