Nonstop Database, HiRDB Version 9 UAP Development Guide
When WHENEVER statements are used, errors can be detected automatically.
WHENEVER statements can identify the following conditions:
For details about the WHENEVER statement, see the HiRDB Version 9 SQL Reference manual.
Determined by using the WHENEVER statement where SQLERROR is specified. When an error occurs, the system shifts to the specified measure. If an error referencing operation is specified, the return codes and related information can be referenced.
Determined by using the WHENEVER statement where NOT FOUND is specified. By specifying the process to be taken when there are no more lines to be searched, the system shifts to the specified measure.
Determined by using the WHENEVER statement where SQLWARNING is specified. When a measure to be taken when warning information is present in normal termination is specified, the system shifts to the specified measure only when warning information is present.
When a search using a list is executed, normal termination without any data (a row that was present when the list was created has been deleted) may occur. If SQLCODE is 110 or SQLSTATE is R2000, the UAP must determine that normal termination without any data occurred and skip the processing for selection rows.
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.