The error code generated by the last command executed.
$errcode
A number (0 to 9999.) Can be reset by an application program.
Indicator of success (0) or a reason (1 to 9999) for the failure of the most recently executed command.
Explanations for many error codes are contained in the ErrorHelp entity set, which you can access from your database application using the DESCERR or EXPLERR utility program.