Installs an entry handler
DBMS ONENTRY CALL
functionDBMS ONENTRY JPL
jplEntryPointDBMS ONENTRY STOP
- Name of prototyped function.
- Name of JPL procedure.
- Remove any installed entry handler.
DBMS ONENTRYto install a function or JPL procedure which Panther calls before it executes each
This function is for informational purposes only. For instance, you can log statements to a text file before executing them. You can use this function with an exit function to track the start and end time for a query or any other database operation.
The function is passed three arguments:
- A copy of the first 255 characters of the statement; if the statement is executed from JPL, this is the first 255 characters after the command word
- The name of the database engine for the statement.
- Context flag; for the entry handler its value is 0.
The function's return code is not used.
The following sample function logs the current statement in a text file./* This function is installed as a prototyped function.*/
/* It writes the current time, name of the current */
/* engine, and the command which Panther will execute */
/* to a file called dbi.log. *//* dbms ONENTRY CALL dbientry */#include <smdefs.h>
dbientry (stmt, engine, flag)
fp = fopen ("dbi.log", "a");
timeval = time(NULL)
fprintf (fp, "%s\n%s\n%s\n\n",
ctime(&timeval), engine, stmt);
This sample function displays a message before performing any database operations.// dbms ONENTRY JPL entrymsg
msg setbkstat "Processing. Please be patient..."
ONEXIT, Chapter 12, "DBMS Global Variables," Chapter 37, "Processing Application Errors," in Application Development Guide