||When QUEUE with LOW option is specified, the following takes place:
- When NOTIFY is processed, it performs an ENQ upon a QUEUE with RNAME of ‘TRDUSER’ and a scope of ‘JOB’. This call blocks until it acquires the QUEUE.
- After the job gets the QUEUE, it continues until it reaches a specific point (such as the request completes) when it releases the QUEUE by performing a DEQ.
||When an error occurs, NOTIFY behaves as follows:
- When NOTIFY is processed, the subsystems used by Teradata FastLoad are initialized and, if necessary, any user exits are loaded and a call is made to initialize the system log (or an ENQ is performed).
- If initialization fails, FastLoad displays an error message and terminates execution with return code 12.
- If anything fails after initialization, the request fails. If a user exit returns anything other than 0, a FastLoad displays an error message and terminates execution with return code 12.
||The following points pertain to restarts related to NOTIFY:
- If a Teradata FastLoad job ends abnormally or unsuccessfully, it can be restarted and some NOTIFY-related activities are re-executed. This is an important issue with respect to writing user exits.
- If a Teradata FastLoad job ends abnormally or unsuccessfully while it is holding a queue (using the QUEUE type parameter under z/OS), it releases the queue before exiting the job. Therefore, when the job restarts, ensure that it again acquires the queue before it continues processing.
|Creating Exit Routine
||When creating an exit routine, the following general procedures are constant across all operating systems:
- The exit must be named _dynamn.
- Success is indicated by the return of a 0 (long integer format).
- Failure is indicated by the return of a nonzero value (long integer format). Different integers can be used to indicate different errors.
- The parameter to the procedure is a pointer to a variable record structure.
For a definition of the variable record structure, see Notify Exit Routine Example.
- A C prototype example for an exit procedure might be as follows (using a Teradata FastLoad example):
long _dynamn(FLNotifyExitParm *P)
The procedures for creating and using an exit routine are the same as for creating and using an INMOD routine, as described in INMOD and Notify Exit Routines and Compile, Link, and Execute INMOD and Notify Exit Routines.