|
jim, yes you can define a klist shorter than the number of key fields in your file. -----Original Message----- From: Jim Langston [mailto:jimlangston@conexfreight.com] Sent: Monday, December 11, 2000 12:40 PM To: RPG400-L@midrange.com Subject: Re: DoU... Hmm... I can't define a KList that is shorter than my key fields, can I? I will try this and see if it works, but I was sure I couldn't do this. Regards, Jim Langston Scott Mildenberger wrote: > > Jim, > > Instead of using READ, use READE with a KLIST that only has the two parts of > the equipment number. That way, you don't have to check when you run out of > records with a matching equipment number. Or you could define a logical > with all proper fields to check against and then just do a SETLL to check > whether the record already exists. > > Scott Mildenberger > > > -----Original Message----- > > From: Jim Langston [mailto:jimlangston@conexfreight.com] > > Sent: Friday, December 08, 2000 5:15 PM > > To: RPG400-L@midrange.com > > Subject: DoU... > > > > > > I am writing a new program, and one of the things I am trying to do is > > to see if a record already exists. The Key for this record has the > > Equipment Number (in 2 parts, EqId and EqNo) and Entry date. > > > > What I am actually looking for is the record with the same equipoment > > number and the existing RefB (Customer Refernace Number) matching. > > > > This is the way I'm doing it, and obviously after this code I am going > > to have to do a If FoundMatch = *On, or to put a call to a subroutine > > just before, or after, the Eval FoundMatch = *On. > > > > It's not, IMO, real clean code. I seem to think it can be > > streamlined a > > bit. I am only reading the records with the same container > > number as I > > use a SetLL and my DoU will fail when the container doesn't match. > > > > Any suggestions? All comments welcome. > > > > C Eval FoundMatch = *Off > > C CCOHD_Key SetLL OHdRc > > C Read OHdRc > > C DoU FoundMatch = *On > > C Or %Eof(OHdRc) > > C Or EQEqId <> RXEqId > > C Or EqEqNo <> RXEqNo > > > > C If %Trim(OHBL#) = %Trim(RXInv#) > > C Eval FoundMatch = *On > > C Else > > C Read OHdRc > > C EndIf > > > > C EndDo > > > > Regards, > > > > Jim Langston > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.