|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] I do not believe that you can use %found, to get the status of the chain, after you've done the read. Because %found, or even %found(filename) will only return the status of the last file operation. However, (not that it isn't out there) but I've not seen a reason I would care about the status of the chain after I've already done other file operations. chain K1 filename; dow %found(filename); // some stuff here reade K1 filename; enddo; Why would you care? To see if you had any hits at all? Then maybe: chain K1 filename; if %found(filename); dow %found(filename); // some stuff here reade K1 filename; enddo; else; // no hits endif; Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Srinath R , Gurgaon" <srinathr@ggn.hcltech.com> Sent by: rpg400-l-admin@midrange.com 09/03/2002 04:37 AM Please respond to rpg400-l To: rpg400-l@midrange.com cc: Fax to: Subject: Built-in functions. Hi, I would like to know , are the built-in functions like (%Found,%EOF...) specific to file operations. I mean %Found to be used only for Chain and %EOF for Read/Reade...and like that. Now If I am having a Chain operation followed by a Setll and reade and If I am checking for %Found, It will be successful even-though the record may not have been found (the high indicator is seton for Chain and Equal indicator for reade). Considering this scenario can anyone please help me to come to a conclusion, why %Found should be successful. C K1 CHAIN TESTPF 05 C K1 SETLL TESTPF 20 C K1 READE TESTPF 10 C IF %FOUND Can I use %Found for the chain opcode after Reade. If so, how to go about the same. Or should I revert back to usage of indicators. Please feel free to contact, in case I am not clear about the above mentioned problem. Regards Srinath _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.