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

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

ILE Condition Handlers

View previous topic View next topic Go down

ILE Condition Handlers

Post  maran on 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.
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top


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