|
From: rob@xxxxxxxxx You know, it's been awhile since I've seen that. There was this gal that did not know that RPG had a SETLL and a READ. She'd try a chain on a 1, then a 2, then a 3... Then again, she'd only been programming RPG for a few YEARS! With READ you'd almost have to do level break read primary; if keyfield>(1 + savekey); // go read secondary until caught up with keyfield Else; setll secondary; read secondary; EndIf; after awhile, starts to make the sql not look too bad.
Actually, scary as it might sound this is a perfect fit for matching records. You would read every primary file record, followed by all the records for the secondary file that match the primary. You could check the NMR indicator on the primary to identify primary records with no children. This would also allow you to check for multiple secondaries for a primary and orphaned secondaries. But I digress. A LEFT OUTER JOIN is probably what Don wanted. Joe
As an Amazon Associate we earn from qualifying purchases.
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.