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


  • Subject: Re: Trapping errors with CALLP?
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 24 Dec 1999 03:05:43 -0600

David,
   Yes, this is a constant problem for me (also on V3R2)
The best solution seems to depend on what exactly you're doing...
In some cases, I just use CALL.  Especially if I'm doing something
thats "call-level sensitive" like an OVRDBF.

In other cases, I'll write a simple wrapper routine in a sub-proc
which will use CALL to call QCMDEXC, and then pass the error
indicator as the return value.

Writing a whole seperate CL module, or coding a *PSSR (which is the
worlds most awkward way to handle errors, IMHO) seems awfully
extreme just to avoid using CALL...  CALL isn't THAT bad.

If I'm doing something a bit more complex that requires
better information, I'll use QCAPCMD instead, which will actually
return a "QUSEC" structure with error information, and then I dont
have to worry about error trapping.

(It really frustrates me how people just assume you're running
some variant of V4, and can use the newest versions of RPG)


David Gibbs <david@midrange.com> wrote:
> >
> > CALLP(E)  and check %error
> >
> > I've run into a problem using CALLP ... I can't trap errors.
>
> I forgot to mention ... I'm compiling to V3R2 :(
>
> david
>

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.