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



Thanks!

Definitely putting the code repository to good use.  


Kurt Anderson
Application Developer
Highsmith Inc

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Christen, Duane J.
Sent: Tuesday, July 26, 2005 3:39 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: User Condition Handler Example



These are the copybooks:
http://code.midrange.com/index.php?id=0c09a304c2 DQUSEC
http://code.midrange.com/index.php?id=a40b9b3f86 DQMHRCVPM
http://code.midrange.com/index.php?id=1b5d8cb4e1 DQMHSNDPM
http://code.midrange.com/index.php?id=a9565df204 DUSERCH
http://code.midrange.com/index.php?id=bd240da5b8 ZQMHRCVPM
http://code.midrange.com/index.php?id=31cc85e3a2 ZQMHSNDPM
http://code.midrange.com/index.php?id=2898ff8b5e ZQUSEC
http://code.midrange.com/index.php?id=b8c579c977 ZUSERCH


This is the user condition handler code
http://code.midrange.com/index.php?id=867b3820e8 PVRM999900

This is the example procedure.
http://code.midrange.com/index.php?id=02310231c4 TESTBED

Many of the copybooks are several years old and use 9B values. Someday
when I get the chance I hope to fix them, and remove the underline from
the DS and field names.

FYI: Each of the initializing (Z...) copybooks has a cleanup (L...)
copybook. I did not include them here because they are not used in the
example, and would only really be needed if used in a program that
returns with LR *ON.

If you have any questions let me know.

Duane Christen 





-----Original Message-----
From: Kurt Anderson [mailto:kjanderson@xxxxxxxxxxxxx]
Sent: Tuesday, July 26, 2005 12:30 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Ending a program from within a procedure


I'd like to see the examples if you have time.

Thanks,

Kurt Anderson
Application Developer
Highsmith Inc

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Christen, Duane J.
Sent: Tuesday, July 26, 2005 12:00 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Ending a program from within a procedure

Carel;

I use them all the time. I have a condition handler that intercepts an
escape message, handles it, and places the relevant information in an
error structure (same as IBMs API error struct) and returns that to the
caller which then will determine how to deal with the error from the
procedure. 

Depending on your process you can set the error handling up as granular
or course as you want/need. You can also create "retry" and "exit" logic
using the C functions setjmp/longjmp. You can also imitate the error
handling of IBM APIs, pass an error struct and error info will be
returned (if one
occurs) otherwise the procedure will die hard.

If anyone is interested I can get some examples together sometime this
week.

Duane Christen


-----Original Message-----
From: Carel Teijgeler [mailto:coteijgeler@xxxxxxxxx]
Sent: Tuesday, July 26, 2005 11:28 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Ending a program from within a procedure


Reading this thread I miss the mentioning of the Condition Handler APIs:
CEEHNDLR and CEEHDLU. 

It has to be registered at the beginning of a programme and unregistered
at the end (of course). It requires (a) special procedure(s) to handle
errors.
You can tell what action to be taken: perculate, promote, etc.

Joe Pluta wrote an article in MC on this in 2001.

Are those APIs not intended to do what you want to do? Or is it it just
one of the many (failed?) attempts to get a decent error handling
routine in an RPG programme?

Just wondering.

Regards,
Carel Teijgeler 



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.



--
This is the RPG programming on the AS400 / 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.


--
This is the RPG programming on the AS400 / 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.



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