View previous topic :: View next topic
|
Author |
Message |
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
Dear All,
I want to write cobol program and I am expecting code or step by step procedure
Please help me out and find my query
File1
2000
File2
100
200
400
500
600
700
I have two input file File1 and File2. I need to match file1 and file2
here File1 have 2000.
Now I want to sum (100 + 200 ) .If its matching file1 and file2 else
I need do (100+200+300 ) .If its not matching else
.......
etc ....
like ,I need to do match all input file2.
My my output should be
output 1
200
500
600
700
or
output 2
100
200
400
600
700
My output should be come Output 1 records or output 2 records. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
hi vicky,
Can you explain the sum function clearly so that we can provide you the code.
Quote: |
I have two input file File1 and File2. I need to match file1 and file2
here File1 have 2000.
Now I want to sum (100 + 200 ) .If its matching file1 and file2 else
I need do (100+200+300 ) .If its not matching else
.......
etc ....
|
|
|
Back to top |
|
|
kgumraj2
New User
Joined: 01 Aug 2007 Posts: 42 Location: Hyderabad
|
|
|
|
Hi,
Are you only checking for equal or greater than also,
Please do provide this information also. Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please look at this similar topic.
http://ibmmainframes.com/viewtopic.php?t=22885
As i posted in that topic, this sounds like the "classic" accounts receivable "cash application" process. Invoices are paid when an exact match is found or if the total of multiple invoices equals a payment.
If your requirement is similar, you need to clearly define all of the processing rules before you begin coding.
Unless this is a school project and the requirements are less confining. |
|
Back to top |
|
|
Raphael Bacay
New User
Joined: 04 May 2007 Posts: 58 Location: Manila, Philippines
|
|
|
|
Hello,
Can you explain the matching algorithm again? It is a little fuzzy.
Regards. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The cash application algorithm will be very fuzzy until all of the business rules are defined (even then it is usually not trivial). Only when all of the rules are known, might the code be written.
If you post all of the rules, we may be able to help. |
|
Back to top |
|
|
|