× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Take the (E) off of the READ and it will work the way you want again.  The
(E) tells the system that you are going to handle the error in your program,
which you could do.  But if you aren't going to handle it then remove the
(E).

Scott Mildenberger

> -----Original Message-----
> From: Robin Coles [mailto:robin@ringbase.com]
> Sent: Friday, October 05, 2001 12:10 PM
> To: rpg400-l@midrange.com
> Subject: READ(E) and locked records
>
>
> I've just been caught out by something that should have been
> obvious but
> we missed.  I wondered what the best way to deal with it was
>
> With READ and an indicator, if the record happened to be
> locked the user
> got an error message that was ugly but allowed a retry.  It
> happened so
> infrequently and recovery was so painless that we just accepted it.
>
> We've recently switched to using READ(E) and %EoF etc, using code
> similar to:
>
> Read(E)       File
> Dow           Not %EoF
> ... Some stuff here
> Update        File
> Read(E)       File
> EndDo
>
> but now we don't get the error message if there's a lock, and we fall
> through the DoW loop ending up with an update without prior read or
> chain.
>
> We could code DoW not %EoF and not %Error, but that's hiding the
> problem.  I'd like to be able to give the user the option to retry.
>
> What does everyone else do?  INFDS, register an error handler?
>
> Cheers
> Rob
>
> _______________________________________________
> 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.