IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SUM FIELDS=


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts Converting unpacked fields to pack us... SYNCSORT 4
No new posts Data for newly added fields not displ... IMS DB/DC 6
This topic is locked: you cannot edit posts or make replies. SUM FIELDS=NONE in reverse - Get dupl... DFSORT/ICETOOL 9
Search our Forums:

Back to Top