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



I never use anything but specific codes - and yes - I do have named constants for all of them in a standard /COPY member.

I use *ALL (or blank) at the end if there's anything meaningful I can do in may app - if not I only code the specifics and don't use a *ALL. That way standard RPG error handling takes over - the PSSR kicks in or whatever.


On 2013-06-21, at 5:54 PM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

On another thread, the use of MONITOR was brought up. I'll admit I
haven't used it myself, and I don't think I've ever seen it in our
code base. My question to those who do have experience with it is:
How often do you find you need to catch a numeric status code, rather
than *PROGRAM, *FILE, or *ALL?

The reason I ask is that in languages like Java and Python, it is
encouraged to catch as specific an exception as is appropriate, so
that you don't inadvertently mask errors that really *should* halt
your program (or bubble up to the caller). But those languages have
somewhat self-documenting class names to use, so I've found their
exception-handling code fairly readable.

Are *PROGRAM and *FILE sufficiently specific in real-world RPG code?
If not, is the standard practice to give meaningful names to the
status code literals in the D-specs (as I've seen recommended for
indicators and indeed for most literals of any kind)?

John
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





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.