Expected output for validation routines

The validation routines must leave a return code in EXPLRC1.

Begin program-specific programming interface information.The return code in EXPLRC1 has one of the following meanings:

Table 1. Required return code in EXPLRC1
Value Meaning
0 Allow insert, update, or delete
Nonzero Do not allow insert, update, or delete

If the operation is not allowed, the routine might also leave a reason code in EXPLRC2. Db2 returns SQLCODE -652 (SQLSTATE '23506') to the application program and puts the reason code in field SQLERRD(6) of the SQL communication area (SQLCA).End program-specific programming interface information.