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

Need help with DFSORT/ICETOOL


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

New User


Joined: 21 Jul 2007
Posts: 4
Location: India

PostPosted: Wed Jun 19, 2013 10:49 pm
Reply with quote

My input file is a fixed block file with below mentioned data

Code:
      1216.71 ,          1764.23 ,             IMO,AAAAAAAAAA                   
      1216.71 ,            30.42 ,              20,BBBBBBBBBBBB                     
      1863.68 ,          2702.34 ,             IMO,CCCCCCCCC                   
      1863.68 ,            46.59 ,              20,DDDDDDDDDD                     
      1861.45 ,          2699.10 ,             IMO,EEEEEEEEEEEE                   
      1861.45 ,            46.54 ,              20,AAAAAAAAAA                     
     29320.42 ,          2052.43 ,             IMO,EEEEEEEEEEEE                   
     70016.06 ,          4901.12 ,             IMO,AAAAAAAAAA                   
    110000.00 ,          8525.00-,             IMO,AAAAAAAAAA                   

Desired output using SORT Utility:

Code:
PREMIUM AMOUNT, COMMISSION AMOUNT, HIERARCHY LEVEL, NAME
      1216.71 ,          1764.23 ,             IMO,AAAAAAAAAA                   
      1216.71 ,            30.42 ,              20,BBBBBBBBBBBB                     
      1863.68 ,          2702.34 ,             IMO,CCCCCCCCC                   
      1863.68 ,            46.59 ,              20,DDDDDDDDDD                     
      1861.45 ,          2699.10 ,             IMO,EEEEEEEEEEEE                   
      1861.45 ,            46.54 ,              20,AAAAAAAAAA                     
     29320.42 ,          2052.43 ,             IMO,EEEEEEEEEEEE                   
     70016.06 ,          4901.12 ,             IMO,AAAAAAAAAA                   
    110000.00 ,          8525.00-,             IMO,AAAAAAAAAA                   
06/15/2013, FILE TRAILER,             ,             ,5594.22 ,


Header record as mentioned abouve
Trailer record to have date and Sum of all COMMISSION AMOUNT which have HIERARCHY LEVEL as IMO
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Jun 19, 2013 11:02 pm
Reply with quote

c_mayur,

Welcome to the forums!..Next time please try to give a meaningful title, something that would convey your requirement in short. (Another 'Need help' over there!!!)

Also I am afraid if your total amount shown in the output differs from the 'IMO' COMMITION AMOUNT sum.
Back to top
View user's profile Send private message
c_mayur

New User


Joined: 21 Jul 2007
Posts: 4
Location: India

PostPosted: Wed Jun 19, 2013 11:21 pm
Reply with quote

Arun, I'll take care going forward.

The Trailer count will have sum of COMMISSION AMOUNT and since there is one amount in negative(last one) the sum is coming to 5594.22.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 19, 2013 11:35 pm
Reply with quote

Hello and welcome to the forum,

Your post has been "Code'd" to preserve alignment - please do this in the future.

Your input does not show a negative - causing the confusion. If you wish, i can change the input . . .
Back to top
View user's profile Send private message
c_mayur

New User


Joined: 21 Jul 2007
Posts: 4
Location: India

PostPosted: Thu Jun 20, 2013 12:06 am
Reply with quote

Dick, Thanks it will be good if you can update the last line of input as below.

Code:
    110000.00 ,          8525.00-,             IMO,AAAAAAAAAA                   


Thanks for your support.

Mayur
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 20, 2013 12:50 am
Reply with quote

You're welcome - 'Tis changed icon_smile.gif

d
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jun 20, 2013 4:35 am
Reply with quote

You will need OUTFIL REMOVECC, HEADER1 (for the header) and TRAILER1 (for the trailer).

Since there is no reason to suspect otherwise, I'll assume the date on the trailer is a constant.

The only "tricky" thing is getting the values added up.

You'll need to find a "data type" (Table 55 in the Application Programming Guide) which reflects your data, and which can be used in TOT on TRAILER1.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Jun 21, 2013 12:02 am
Reply with quote

c_mayur,

1. Please do NOT send Private messages seeking help. I won't be providing solutions via private messages.

2. I have my regular DFSORT development work to finish before I start providing the solutions on helpboards.

3. I provided the solution on the other helpboard which I get to answering first.

Thanks
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top