ILE Condition Handlers
Page 1 of 1
ILE Condition Handlers
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.
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.
Similar topics
» What are the different condition types?
» What are the 2 condition types used in SYNON/2E?
» Define the term 'Condition' in SYNON/2E.
» Where are the Condition names and values stored within the model?
» What are the 2 condition types used in SYNON/2E?
» Define the term 'Condition' in SYNON/2E.
» Where are the Condition names and values stored within the model?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|