[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


There is 2 file, which contains records, in one file i have...

<< Back to: COBOL FAQ

Question by nandha
Submitted on 5/4/2004
Related FAQ: COBOL FAQ
Rating: Not yet rated Rate this question: Vote
There is 2 file, which contains records, in one file i have to get a value and check that value is availabe in the other file, same way there may be many values in the file all the valus have to be chedked with the other file, and the file should be only once opened and close,
so when we take a value from a file and check in other file and if the value is not in that file till checking end of file , now the other value have to be taken for them file and again check, but the problem is how the file has reached end, so how to check this from the start again ?


Answer by varma
Submitted on 7/25/2005
Rating: Not yet rated Rate this answer: Vote
You can use both sorted files to reach your requirement. Sort both the files based on your search criteria and get input from one file and search the other file unitl equal to or greater than your searching value.
No need of closing files.

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: COBOL FAQ


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.