 is perhaps
    useful for debugging or prototyping applications, before
    installing a more <SPAN
CLASS="QUOTE"
>"user-friendly"</SPAN
> error handler.

</P><PRE
CLASS="PROGRAMLISTING"
>EXEC SQL WHENEVER SQLERROR CALL print_sqlca();

void
print_sqlca()
{
    fprintf(stderr, "==== sqlca ====\n");
    fprintf(stderr, "sqlcode: %ld\n", sqlca.sqlcode);
    fprintf(stderr, "sqlerrm.sqlerrml: %d\n", sqlca.sqlerrm.sqlerrml);
    fprintf(stderr, "sqlerrm.sqlerrmc: %s\n", sqlca.sqlerrm.sqlerrmc);
    fprintf(stde