× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



All I can say is thank God for Query!!!!

Each time I ran the program I got a message saying it had updated the master
file with 200 records. Odd, since I was supposed to have 100 days worth of
data. I cleared the master file and ran the program again. It showed 100
updated records. Also odd since the master file was empty to start with.
Then I ran Query and found there were 200 records in the update file. But
when I sorted them by date I discovered there were 2 for each day with
different data for each day. So the program was updating the master file to
one value then updating the same record with another value!!! Boy, is my
face red!!!

Thanks for the input guys. Turns out my program is okay - I just have a
data problem.

BTW, speaking as someone who was on V1R0 (for about a week) I still think
the smartest guy or gal at IBM is the one who wrote Query.








On Tue, Nov 25, 2008 at 4:32 PM, James Newman, CDP <newmanas400@xxxxxxxxx>wrote:

It's been a while since I've done an update program and I know I should
know the answer to this but I don't.

I have a program that reads an update file sequentially and writes to a
master file. After it reads a record from the update file, it chains out to
the master file. If no record was found with the same key it writes the
record to the master file with a WRITE. If a record was found with the same
key, it check 4 other fields to see if this is an exact duplicate. If it is
an exact duplicate it discards the record from the update file. If there
are difference in the 4 fields, it writes the update information by moving
the data to the master file's record and does an UPDAT. I should also
mention I've put code into the program to print the update record and the
master record when it finds one it is going to update.

I ran the program and it shows 200 records updated. I ran it again and it
again shows 200 records updated. It is apparently finding the discrepancies
but not really doing the update.

My question is this: once I find the differences, do I have to CHAIN again
to get the proper record in position to update?

TIA.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.