15.00 - Completion Message - FastLoad

Teradata FastLoad Reference

prodname
FastLoad
vrm_release
15.00
category
Programming Reference
featnum
B035-2411-034K

Completion Message

The Teradata FastLoad completion message is:

Number of FastLoad sessions connected = 8
FDL4808 LOGON successful

NOTIFY

Purpose  

The NOTIFY command specifies a user exit or predefined action to be performed whenever certain significant events occur during a Teradata FastLoad job. (For a listing of events that cause notifications, see Table 40 on page 136.)

The notify function is especially useful in operator‑free environments where job scheduling relies heavily on automation to optimize system performance. For example, by writing an exit in C (without using CLIv2) and using the NOTIFY… EXIT option, a routine to detect whether a Teradata FastLoad job succeeds or fails, how many records were loaded, what the return code was for a failed job, and so on can be provided.

Note: The Teradata FastLoad NOTIFY command applies only to the job that immediately follows it.

Syntax  

where:

 

Syntax Element

Description

OFF

Default. No notification of events is to be provided.

LOW

Notification is to be provided for those events signified by “Yes” in the Low Notification Level column of Table 40.

MEDIUM

Notification is to be provided for those events signified by “Yes” in the Medium Notification Level column of Table 40.

HIGH

Notification is to be provided for those events signified by “Yes” in the High Notification Level column of Table 40.

EXIT

A userwritten exit is to be called at the appropriate time.

name

The name of a usersupplied library with an entry point named
_dynamn.

The default library names are:

  • libnotfyext.dll for Windows
  • libnotfyext.so for UNIX platforms
  • NOTFYEXT for z/OS platforms.
  • TEXT "string"

    A usersupplied string of up to 80 characters that Teradata FastLoad passes to the named exit routine

    The string specification must be enclosed in doublequote characters (").

    MSG "string"

    A usersupplied string of up to 16 characters that Teradata FastLoad logs on to:

  • The operator console on mainframeattached z/OS client systems
  • The system log or EventLog service on networkattached UNIX or Windows systems
  • The string specification must be enclosed in double quote characters. This service is not available on Windows 98.

    QUEUE

    Specifies that a queue is to be manipulated via ENQ or DEQ

    See Table 41 for more details.

    This option is valid only for z/OS.

    option

    One of the following:

    RNAME defines a quoted string of up to 255 characters. The default is TRDUSER.

    SCOPE defines one of the following:

  • JOB specifies that the QUEUE is local to the job (including all of the job steps). This is the default.
  • SYSTEMS specifies that the QUEUE is global to all computers in the complex.
  • SYSTEM specifies that the QUEUE is global to the computer on which it is running.
  • NOBLOCK specifies that if the ENQ blocks for any reason, it must return an error instead. This is a fatal error for the job.

    The default, an implied BLOCK (there is no BLOCK keyword), means that the ENQ will wait for the QUEUE.

    EXIT64

    A user‑written exit is to be called at the appropriate time.

    EXITEON

    A user-written exit is to be called at the appropriate time.

    Table 40 lists events that create notification.

     

    Table 40: Events that Create Notifications  

    Event

    Notification Level

    Signifies

    Low

    Medium

    High

    Initialize

    Yes

    Yes

    Yes

    Successful processing of the NOTIFY command

    File or INMOD open

    No

    No

    Yes

    Successful processing of the DEFINE command

    Phase 1 begin

    No

    Yes

    Yes

    Beginning of the insert phase, as specified by the INSERT statement

    Checkpoint

    No

    No

    Yes

    Checkpoint information has been written to the restart log table

    Phase 1 end

    No

    Yes

    Yes

    Successful processing of the CHECKPOINT LOADING END request after the end of the insert phase

    Phase 2 begin

    No

    Yes

    Yes

    The END LOADING command is about to be sent to the Teradata Database

    Phase 2 end

    No

    Yes

    Yes

    Successful processing of the END LOADING command

    Error table 1

    No

    No

    Yes

    Successful processing of the SEL COUNT(*) request for the first error table

    Error table 2

    No

    No

    Yes

    Successful processing of the SEL COUNT(*) request for the second error table

    Teradata Database Restart

    No

    Yes

    Yes

    A crash error from the Teradata Database or the CLIv2

    CLIv2 error

    Yes

    Yes

    Yes

    A CLIv2 error

    Teradata Database error

    Yes

    Yes

    Yes

    A Teradata Database error that will terminate Teradata FastLoad

    Exit

    Yes

    Yes

    Yes

    Teradata FastLoad is terminating

    Usage Notes  

    Table 41 describes the things to consider when using the NOTIFY command.

     

    Table 41: 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 NOTIFYrelated activities are reexecuted. 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.
  • Note: For a definition of the variable record structure, see “Notify Exit Routine Example” on page 208.

  • 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” on page 60 and Appendix D: “Compile, Link, and Execute INMOD and Notify Exit Routines.”