NOTIFY | Usage Notes | Teradata FastLoad - 17.20 - Usage Notes - FastLoad

Teradata® FastLoad Reference - 17.20

Release Number
June 2022
English (United States)
Last Update

The following table describes the things to consider when using the NOTIFY command.

Usage Notes for NOTIFY 
Topic Usage Notes
QUEUE Notes When QUEUE with LOW option is specified, the following takes place:
  1. 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.
  2. 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.
Error Handling 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.
Restarts 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.