Provides additional information about an NDB warning or error condition.
The &NDBERRI system variable contains up to 12 characters of additional information when certain NDB error conditions occur. For example, if an &NDBADD or &NDBUPD statement set &NDBRC to 104 (duplicate unique key value detected), &NDBERRI contains the name of the field in error.
Not all error responses provide a value in &NDBERRI.
Example: &NDBERRI
& NDBADD ... &IF &NDBRC = 104 &DO &WRITE DATA=DUPLICATE KEY ON ADD, FIELD = &NDBERRI &GOTO ERROR_EXIT &DOEND
Notes:
This example displays the name of the field with a duplicated key value, if the add fails with that response.
If no NDB statements have been issued by the executing NCL process, &NDBERRI returns a null value.
&NDBERRI is always cleared when the next &NDBxxx statement is executed. For this reason, the value should be saved in a user variable if other &NDBxxx statements must be executed before using the saved value.
For more information about the contents of &NDBERRI for each possible &NDBRC value, see the Network Control Language Programming Guide.
| Copyright © 2009 CA. All rights reserved. |
|