|
Larry; <snip> But all of these options are simply combinations of moving the resume cursor and continuing, or cancelling back to a point and continuing. Why is the retry option offered to the person least qualified to decide whether to take it? :-) There must be a way. Cheers Larry Ducie </snip> There is but IBM does not provide an interface with enough granularity to allow you to do it "systematically". What you want to do is catch the RNQ1218 inquiry message and automatically process it, but IBM only allows you to do this system wide, AFAIK. So you have to emulate what IBM does deep down in the compiled RPG code/condition handler(s): IBMs Way: 1. Read a record 2. CPF5027 exception produced by DB 3. RNX1218 issued by RPG condition handler which caught CPF5027 4. RNQ1218 issued by RPG (?) condition handler which caught RNX1218 4A. Depending on the reply to RNQ1218 do something. If it is "R" go back to step 1. ... AFAIK you can't set the resume cursor to the previous/last statement ran, so you have to roll your own. My Solution: 1. setjmp 1A. Read a record 2. CPF5027 exception produced by DB 3. CPF5027 caught by user condition handler. Message sent on 3rd retry otherwise longjmp issued to return to step 1. ... If anyone has a better process I would like to know what it is. Duane Christen NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail.
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.