Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to group and sum the decimal value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to group and sum the decimal value
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: 282
Location: Cincinnati OH USA

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

https://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: 2426
Location: @my desk

PostPosted: Wed Mar 07, 2018 2:06 am    Post subject:
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    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 Comparing Signed Packed decimal and p... Virendra Shambharkar SYNCSORT 2 Wed Nov 14, 2018 9:37 am
No new posts RPG II Problem with unsigned Packed d... Andi1982 All Other Mainframe Topics 6 Tue Sep 11, 2018 6:11 pm
No new posts Group changes and numbering the group... Auryn DB2 2 Thu Aug 16, 2018 1:32 pm
No new posts How can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm
No new posts Group changes and numbering the groups Auryn DB2 2 Tue Mar 20, 2018 7:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us