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 FIELDS=

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Tue Jun 14, 2005 5:00 pm    Post subject: SUM FIELDS=
Reply with quote

Pls anyone suggest me how to achieve below

Below is FILEA records

Code:

A      B      C
017 04000 050000
017 03000 030000
017 07000 020000
810 01000 020000
810 02000 010000
900 01000 020000


I want the output as below

Code:

017 14000 100000
810 03000 030000
900 01000 020000


Thanks..
Back to top
View user's profile Send private message

Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Tue Jun 14, 2005 6:08 pm    Post subject: Re: SUM FIELDS=
Reply with quote

sangiah,

Here is the JCL that do what you need
Code:

//STEP0001 EXEC PGM=ICETOOL                     
//DFSMSG   DD SYSOUT=*                         
//TOOLMSG  DD SYSOUT=*                         
//TOOLIN   DD *                                 
  SORT FROM(IN) TO(OUTX) USING(ICE0)           
/*                                             
//IN       DD *                                 
017 04000 050000                               
017 03000 030000                               
017 07000 020000                               
810 01000 020000                               
810 02000 010000                               
900 01000 020000                               
/*                                             
//OUTX     DD SYSOUT=*                         
//ICE0CNTL DD *                                 
  OPTION ZDPRINT                               
  SORT   FIELDS=(1,3,ZD,A)                     
  SUM    FIELDS=(5,5,ZD,11,6,ZD)

The output is:
Code:

017 14000 100000
810 03000 030000
900 01000 020000

Alain
Back to top
View user's profile Send private message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Tue Jun 14, 2005 8:17 pm    Post subject: Re: SUM FIELDS=
Reply with quote

thanks alain.. this is what exactly i am looking for..
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 How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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