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



I wrote my own matching logic program to integrate a batch update to a live file. I did it in free form. In 20 years of programming in this environment (system 36/38/as400) I saw one or two MR programs (and that might have been in school!) Also, it just seemed easier to me.


I am not at work, so I don't have the exact code available, but the logic is not very hard and looks something like this. Obviously without the exact code, I improvised and use some psuedo code. But, the guts are pretty straight forward.


ffile1 prefix(old)
ffile2 prefix(new)


/free
read file1;
read file2;
dow (not %eof(file1) or not %eof(file2));
select;
when old.key = new.key;
update file1; //matched records logic...
read file1;
read file2;
when old.key < new.key;
delete file1; // old file record no longer needed.
read file1;
other; // old.key > new.key = New record!
write file1; // using file2 fields
read file2;
endsl;
enddo;
*inlr = *on;


/end-free







____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.