Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
sangiah

Active User


Joined: 10 Jun 2005
Posts: 64

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
References
Alain Benveniste

Active User


Joined: 14 Feb 2005
Posts: 90

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

Active User


Joined: 10 Jun 2005
Posts: 64

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1