|
It's only a portion of the code, here's the start... 0061.00 0062.00 c read SB220AF LR 0063.00 c dow not *inlr 0064.00 0065.00 c eval LocationId = SBLCID 0066.00 c eval SubAccount = SBSUBA 0067.00 c eval WaterAgency= SBCSAN 0068.00 0069.00 c if WaterAgency= 'DELETE' . . . . . etc. >>> Jim Langston <jimlangston@conexfreight.com> 01/26/01 04:06pm >>> Looking closer at this code, I am totally confused as to what it is you are trying to do. You have code to delete SB510AP and SB220AP, but are reading SB510AF and SB220AF. I think you either are wanting to delete SB510AF and SB220AF instead, or read SB510AF and SB220AP instead. Then, as in my previous message, you are using the %found on the delete instead of the chain. Here is something that should work (not tested) assuming you are reading the correct records but deleting the wrong ones. ... * code not included for initial read of SB220AF and DoW %Found(SB220AF) * c LocationId chain SB510AF c dow %Found(SB510AF) c delete SB510AF c eval FileName = 'SB510AF' c exsr wrtmsg c LocationId reade SB510AF c enddo c delete SB220AF c eval FileName = 'SB220AF' c exsr wrtmsg c read SB220AF c enddo c Eval *INLR = *On Regards, Jim Langston Ted Barry wrote: > > I'm not getting a hit (%found) on the main read (SB220AP), but all other > related records are reporting (exsr wrtmsg) fine. All records are being > deleted, any clues? > > 0101.00 c LocationId chain SB510AF 40 > 0102.00 c dow not *in40 > 0103.00 c delete SB510AP 99 > 0104.00 c if %found > 0105.00 c eval FileName = 'SB510AP' > 0106.00 c exsr wrtmsg > 0107.00 c endif > 0108.00 c LocationId reade SB510AF >40 > 0109.00 c enddo > 0110.00 > 0111.00 c delete SB220AP 99 > 0112.00 c if %found > 0113.00 c eval FileName = 'SB220AP' > 0114.00 c exsr wrtmsg > 0115.00 c endif > 0116.00 c endif > 0117.00 > 0118.00 c read SB220AF >LR > 0119.00 c enddo > > Thanks, > Ted > +--- > | 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.