ALLBASE/SQL Reference Manual (36216-90216)

488 Chapter11
SQL Statements E - R
RETURN
On returning from the procedure, test SQLCODE and Status both to determine whether
an error occurred inside the procedure.
if(sqlca.sqlcode==0)
if(Status!=0) do {
EXEC SQL SQLEXPLAIN :SQLMessage;
printf("%s\n",SQLMessage);
} while (sqlwarn[0]=='W');