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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Need Help to Define 36 Input Fields (... satish.ms10 CLIST & REXX 2 Sat May 07, 2016 3:08 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am


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