|
View previous topic :: View next topic
|
| Author |
Message |
c_mayur
New User
Joined: 21 Jul 2007 Posts: 4 Location: India
|
|
|
|
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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
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 |
|
 |
c_mayur
New User
Joined: 21 Jul 2007 Posts: 4 Location: India
|
|
|
|
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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
c_mayur
New User
Joined: 21 Jul 2007 Posts: 4 Location: India
|
|
|
|
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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome - 'Tis changed
d |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|