× 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.



Rob;

With a user condition handler you can implement any "retry" logic you want, and extend what you have when an un-expected or impossible scenario occurs.

Generally I break the process up into procedures/programs and write them so that they can be re-run, set the jumpPoint (for the longJmp operation) before calling the procedure. If an exception the UCH sends an inquiry message (and email to let us know) and we can investigate the problem, fix it and retry (or cancel) the process. Usually I take the knowledge from this exception and harden the procedure against that specific problem occurring in the future or code the UCH logic to deal with it.

Duane Christen

P.S. I don't code CL programs anymore I use QCAPCMD exclusively to run commands from RPG.


--


Duane Christen
Senior Software Engineer
(319) 790-7162
Duane.Christen@xxxxxxxxxx

Visit PAETEC.COM


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Friday, February 26, 2010 7:59 AM
To: RPG programming on the IBM i / System i
Subject: Re: Uncaught Errors in Interactive Programs and the Users that Ignore the Errors

Sample

MONMSG CPF0000 GOTO(ERRSTUFF)
...
Page 20
...
CPYF MYLIB/MASTERFILE QTEMP/WORKFILE...
DLTF MYLIB/MASTERFILE
CALL ProgramToRecreateMasterFile
...
Page 27
...
goto end
errstuff:
/* handle errors with pretty email */
end:

Now, instead of taking an R when ProgramToRecreateMasterFile blew up I have no MASTERFILE. And my QTEMP copy of WORKFILE is gone. But at least I have pretty email.

The other problem is that developers often get lazy by relying upon the generic top level MONMSG and errors go on for years unnoticed - seen that. But that's mostly without the goto.


Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Vern Hamberg <vhamberg@xxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date: 02/25/2010 06:13 PM
Subject: Re: Uncaught Errors in Interactive Programs and the Users
that Ignore the Errors
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



Rob

I really don't see how this is contrary to what I said about having a
general error handler in the event of completely unexpected errors -
that, as far as I'm concerned, is what that top-level MONMSG is for -
period.

So unless you really are looking for controversy, I see none.

:-)

rob@xxxxxxxxx wrote:
Ok, so you get the pretty error handling email "shirts wrong - go fix
it"
with that kind of go to.
But if your job stream was 27 pages of cl and you're on page 20 and
don't
have good restart procedures it can be dicey. That's why I prefer the
ability to use R to retry.

Then again, should you be running the job from hell interactively
instead
of batch? Or, if you just have to have a pretty status bar, have the
batch job put entries on a data queue and your interactive job can
process
that.


Rob Berendt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.