Exception logic defines the actions to take if an exception to an entity action occurs. You can add the following exception conditions to a READ action:
The WHEN successful exception condition allows you to specify actions to be taken after a successful READ. Not using the WHEN successful exception condition can cause maintainability problems and can decrease execution performance.
The WHEN not found exception condition allows you to specify actions to be taken if an entity occurrence that meets the selection criteria is not found. These conditions also apply to a combination of entity occurrences for each view in the READ list.
If no records are returned as a result of the READ, and there is no WHEN not found clause, an error occurs. The runtime routine TIRFAIL is called to report the error condition.
The following example illustrates how actions following exception conditions in a READ statement can be nested. This example contains multiple READs with multiple exception conditions.
These are Multiple READ Statements with Multiple Exception Conditions:

|
Copyright © 2014 CA.
All rights reserved.
|
|