View previous topic :: View next topic
|
Author |
Message |
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
i have two files in the format which is mentioned as below:
Invoice File
ID Amount
X(3) S9(13)V99
-------------------
004 -110.98
004 -87.87
004 -5435.87
Dist File
ID Amount
X(3) S9(13)V99
-------------------
005 -110.98
005 -87.87
005 -5435.87
The output file should be in the format as below:
VIP-DATA DATE
-------------------------------------------------------
RECORD COUNT OF INVOICE FILE : 3
TOTAL AMOUNT : -5322.76
RECORD COUNT OF DIST FILE : 3
TOTAL AMOUNT : -5322.76
-------------------------------------------------------
it would be great, if anyone could provide some valuable inputs on how to proceed to get the above desired output. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
sun_job,
Is there a way to distinguish the records from invoice file to the dist file? And how did you get the total to -5322.76 when the total of the numbers shown is -5634.72
Also is the lrecl of both files 18 bytes? If so what is the recfm? |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Hi Skolusu,
the invoice file and dist file are having different file names. Am sorry about the total . Yes, the total is -5634.72 .
LRECL = 25 bytes
RECFM = FB |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Sun_job,
Answer the following question.
Skolusu wrote: |
sun_job,
Is there a way to distinguish the records from invoice file to the dist file? |
|
|
Back to top |
|
|
|