You modify the EAB sample code to exclude SQLCA data that you do not need, to return more data, or to extend the length of the error message. If you modify the EAB sample code, also modify the view definitions in your model to agree with code changes. If you rename the EAB source member, also rename the packaging source name and the external DBRM.
Do not call this EAB except after executing a WHEN DATABASE statement. The EAB uses the SAVE-SQLCA area in GLOBDATA to obtain the SQLCA data it returns. The generated application only saves the SQLCA in this area under the following conditions:
The SQLCA is not saved when a logical exception statement executes, or when a database call succeeds. Therefore, you cannot use GET_DB2_MVS_OR_XDB_SQLCA to retrieve SQLCA data that is associated with WHEN SUCCESSFUL, WHEN NOT FOUND, WHEN ALREADY EXISTS, WHEN NOT UNIQUE, or WHEN PERMITTED VALUE VIOLATION statements.
However, after a WHEN DATABASE statement executes, the saved SQLCA for that statement is available, unless replaced by the SQLCA for a subsequent WHEN DATABASE statement. You can use this EAB to return the SQLCA for the last database exception, regardless of how many intervening database calls were made since that WHEN DATABASE statement executed.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|