Gets the text of the last-executed DBMS command#include <dmuproto.h>char *dm_getdbitext(void);
dm_getdbitextlets you get the full text of the last-executed
DBMScommand. This includes all commands executed from JPL with dbms, or executed from C with dm_dbms or dm_dbms_noexp.
You must call this function from within an installed entry, error, or exit handler. This function stores the data in a pool of buffers that it shares with other functions, so you must either process the returned string immediately or copy it to another variable for additional processing.
This function gets the same string that is passed to the first argument of an installed entry, error, or exit handler; however, these handlers are limited to 255 characters.
logfunc PARMS((stmt, engine, flag))
PARM (char *stmt)
PARM (char *engine)
if (strlen(stmt) >= 255)
stmt = dm_getdbitext();
fp = fopen("dbi.log", "a");
fprintf(fp, "%s\n", stmt);
DBMS ONERROR, DBMS ONEXIT