|
%found isn't valid for readc, use %eof instead. In your example, since you did not specify the file name on the readc it is returning the value of %found from the last file operation (on any file) that was performed in your program which may be the chain in the subroutine. Scott Mildenberger > -----Original Message----- > From: Andrew Sereda [SMTP:asereda@HU.EEFT.COM] > Sent: Thursday, April 13, 2000 8:09 AM > To: 'RPG400-L@midrange.com' > Subject: RE: RPG Indicators > > I fell into a trap with "%Found" after readc of a subfile that was > in dow cycle. > > dow field1=0 > exfmt something > readc sfl > if %found > exsr ChkSubroutine > endif > enddo > > ChkSubroutine begsr > ... > key1 chain somefile > ... > endsr > If "chain" is not succes in subroutine there was not %found after readc. > I come back to indicators. > What do you think about this? > > Thanks, > > Andrew Sereda > -----Original Message----- > From: boothm@earth.Goddard.edu [ <mailto:boothm@earth.Goddard.edu>] > Sent: Tuesday, April 11, 2000 1:15 AM > To: RPG400-L@midrange.com > Subject: RE: RPG Indicators > > > Even better use RPGIV and do away with Chain indicators altogether. > "%Found" is a handy bif. > _______________________ > Booth Martin > boothm@earth.goddard.edu > <http://www.spy.net/~booth> > _______________________ > > > > > "Tom Tufankjian" <Tom_Tufankjian@hbltd.com> > Sent by: owner-rpg400-l@midrange.com > 04/10/2000 02:39 PM > Please respond to RPG400-L > > > To: RPG400-L@midrange.com > cc: > Subject: RE: RPG Indicators > > > > > > Here's another thought: combine 2 indicators into 1 if possible, freeing > > up one. Like maybe if you're doing 2 chains to two different files and > you > use the resulting indicator right away and nowhere else in the program. > Use the same indicator for both chains. > > key1 chain filea 10 > 10 write > n10 updat > > /* was: */ > key2 chain fileb 20 > 20 write > n20 updat > > > /* changed to this to free up indicator 20 */ > key2 chain fileb 10 > 10 write > n10 updat > > > Just a thought for when you're in a pinch. > > > +--- > | 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.