PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

ILE Condition Handlers

Go down

ILE Condition Handlers Empty ILE Condition Handlers

Post  maran Fri Dec 30, 2011 2:33 pm

User-Written Condition Handlers

RPG contains plenty of ways to handle errors.

You can use 1) error indicators, 2) built-in functions, 3) error subroutines, or 5) the new MONITOR operations code, introduced in V5R1, to trap and handle all sorts of runtime errors.

But if you're nervous about modifying your code by adding error-handling logic, or you want to create a standard, reusable error-handling module that can be employed by all your programs, the condition handling APIs are for you. The CEEHDLR and CEEHDLU APIs allow you to register and unregister a user-written ILE condition handler. You write the ILE module, or modules, that will handle all your runtime errors; for example, divide-by-zero or array-index-out-of-range errors, and register the modules inside any program where you want to perform error handling.

To register the module, you use the CEEHDLR API. When you're finished, you can unregister it, inside that same program, using the CEEHDLU API.
maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum