BuiltIn Functions › $ERRORDVWSTATUS Function › $ERRORTYPE SQL or DB2
For SQL Dataview:
The SQLCODE from the SQLCA is returned as a character string. The value can be between ‑999 and +999. Negative numbers represent errors.