× 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.



Do not have to chain again.
Without seeing the code it is hard to determine what went wrong.
Field names in Update file (is this UP Update Primary?) should not be same field name as in Master.
Jim
----- Original Message ----- From: "James Newman, CDP" <newmanas400@xxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, November 25, 2008 5:32 PM
Subject: Update question


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.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





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.