|
There's one word missing from this discussion. Performance. Now I'm citing numbers here from 10 years ago at least, on ancient hardware, but I rewrote a program someone had written to update a large master file from a transaction file. It was written using either CHAIN or SETLL/READ (I can't recall) and I changed it to use MR logic. The run time dropped from approx 4 hours to 40 mins. And before anyone asks, no I don't care to recreate a similar test today, but if anyone want to go ahead I'd be happy to hear the results. :-) ...Neil G Armour <garmour400m@xxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 2003/09/17 17:01 Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> cc Subject RE: Sequence error in MR Or, even in RPG, how about: fBONLPF IF E K DISK fBLPART UF E K DISK c Dou %eof( BONLPF ) c Read BONLPF c If not %eof( BONLPF ) c ORDER Setll BLPART c Dou %eof( BLPART ) c ORDER Reade BLPART c If not %eof( BLPART ) c Delete BLPART c Endif c Enddo c Endif c Enddo c Eval *inLR = *On Try to tell me that most RPG programmers will have to go look at a manual before they know what's going on in this code. Also, the original MR example will read every single record in the secondary file - coupled with the RPG cycle overhead, there is no way the MR program will perform anywhere close to a properly <g> written program. If you've got 1,000,000 records in the secondary file, and end up deleting 5,000 of those records, then 995,000 records are unnecessarily read. Still, love your SQL example, Rob! GA --- rob@xxxxxxxxx wrote: > Would that be the same as: > DELETE FROM BLPART > WHERE ORD IN(SELECT ORD FROM BONLPF) <snip> > > > Lurton Keel <LKeel@xxxxxxxxxxxxxx> > Sent by: midrange-l-bounces@xxxxxxxxxxxx > 09/17/2003 02:42 PM > Please respond to Midrange Systems Technical Discussion > > To: "'Midrange Systems Technical Discussion'" > <midrange-l@xxxxxxxxxxxx> > cc: > Fax to: > Subject: RE: Sequence error in MR > > > Mark, > We still have 6 or so MR programs that have worked flawlessly for the > past 20 years. > Almost all of them are deletion programs that remove shipped, paid etc. > items from master files. > Following is an example of one of our programs. > FBONLPF IPE AE K DISK > FBLPART US AE K DISK > IBILL1 01 > I ORDER M1 > IBILL2 03 > I ORDER M1 > OBILLPART DDEL 03 MR > > MR Rules.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.