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

How to group and sum the decimal value


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Tue Mar 06, 2018 9:13 pm
Reply with quote

Hi everyone,

Here is my requirement below:

Input file:

Code:
abc~01/04/2014~0000000001~0000000000001021.21~01/04/2014~aaaa~0000000002~0000000000000023.34
abc~01/03/2014~0000000020~0000000000000104.34~01/03/2014~aaaa~0000000023~0000000000000045.00
def~04/05/2016~0000000010~0000000000000239.00~04/05/2016~bbbb~0000000012~0000000000000012.11
def~03/02/2016~0000000019~0000000000000002.12~03/02/2016~bbbb~0000000018~0000000000000005.11


Then I want my output file as below:

Code:
abc~01/04/2014~0000000021~000000000001125.55~01/04/2014~aaaa~0000000025~000000000000068.34
def~04/05/2016~0000000029~000000000000241.12~04/05/2016~bbbb~0000000030~000000000000017.22


I tried with TOT in the TRAILER, then tried with IF THEN & BUILD but no luck I couldn't get clear idea of how do arrive at the resulting so that i can get this output file.

Can someone please help me with this...


Thanks,

CODED-please use Code tags while posting code/sample data
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 319
Location: Inside the SPEW (Cincinnati OH USA)

PostPosted: Tue Mar 06, 2018 9:44 pm
Reply with quote

www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.icea100/sumcst.htm
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Mar 07, 2018 2:06 am
Reply with quote

sakrat wrote:
I tried with TOT in the TRAILER, then tried with IF THEN & BUILD but no luck
Can you show what you tried?
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 HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
No new posts DB2 group member usage DB2 0
No new posts Group comparison/update between two f... DFSORT/ICETOOL 10
No new posts Group selective VB records - Trailer ... DFSORT/ICETOOL 16
Search our Forums:

Back to Top