NetBase SQL Shadowing Handbook

NetBase SQL User Exits
____________________________________________________________
ver A0195 QUEST Software, Inc. 3-3
procedure must have the logic necessary to process all tables simultaneously. Typically, this
requires simple switching logic to other procedures.
WSL Flags
Three flags in the WSL routines may be set by one of the NetBase processes or by a user exit.
Normally, WSL performs several tests to validate an update before the update is applied on the
shadow copy of the DBE. One check is to verify that the actual transaction length matches the
transaction length in the transaction. If the user exit tells NetBase to delete one of the records in
the transaction, NetBase will set the NO_TRX_LEN_CHK flag.
The WSL routines use before image information from the logfile to find the record being updated
or deleted. In an environment performing concurrent updating of the same tuples, the user may
want NetBase to set the KEY_COL_SRCH_OK flag. This flag tells WSL to search for the row
using only the unique columns and the columns that have changed. The user can tell NetBase to
set this flag through the USEREXIT.
The post_sql_exit_after procedure affects the NetBase's reaction when it encounters an error
applying the transaction on the shadow copy. Normally, the posting process (NBSQLIMP) prints
an error and terminates. If the USEREXIT flag is set on the SQLIN record and if a
post_sql_exit_after procedure is found by the posting process, NetBase calls the user exit and
continues applying the transaction. The default action is to delete the problem record and go on.
If invoked, the user exit must decide what action should be taken and alert any other process if
necessary.
The third flag that pertains to the WSL routines is set by NetBase if the post_sql_exit_after
procedure is being used. It tells the apply procedure to, in the case of an error, return pointers to
the record that caused the error. As a result, when NetBase calls the USEREXIT, it passes
information about the problem record.