The Export operator supports notify exit routines. A notify exit routine specifies a predefined action to be performed whenever certain significant events occur during a job, for example, whether a job succeeds or fails, how many records are exported, what the return code is for the failed job, and so on. Only the main instance sends a notify event.
The Export operator job accumulates operational information about specific events that occur during a job. If the Export operator job script includes the NotifyMethod attribute with the Exit method specification, then when the specific events occur, the Export operator calls the named notify exit routine and passes to it:
- An event code to identify the event
- Specific information about the event
The following table lists the event codes and describes the data that the Export operator passes to the notify exit routine for each event. The information in this table is also sent to the system log.
Event | Event Code | Event Description and Data Passed to the Notify Exit Routine |
---|---|---|
Initialize | 0 | Signifies successful processing of
the notify feature:
|
Teradata Database Restart | 9 | Signifies that the Export operator
received a crash message from the Teradata Database or from the
CLIv2:
|
CLIv2 Error | 10 | Signifies that the Export operator
received a CLIv2 error:
|
Teradata Database Error | 11 | Signifies that the Export operator
received a Teradata Database error that will produce an exit code of
12:
Not all Teradata Database errors cause
this event. A 3807 error, for example, while trying to drop or
create a table does not terminate the Export
operator.
|
Exit | 12 | Signifies that the Export operator
is terminating:
|
Export Begin | 31 | Signifies that the Export operator
is about to begin the export task by opening the export file:
|
Request Submit Begin | 32 | Signifies that the Export operator
is about to submit the SELECT request to the Teradata Database:
|
Request Submit End | 33 | Signifies that the Export operator
has received the response to the SELECT request:
|
Request Fetch Begin | 34 | Signifies that the Export operator
is about to fetch the results of the SELECT request
|
File or OUTMOD Open | 35 | Signifies that the Export operator
is about to open an output or OUTMOD routine file
|
Statement Fetch Begin | 36 | Signifies that the Export operator
is about to fetch the current statement in a request:
|
Statement Fetch End | 37 | Signifies that the Export operator
has fetched all of the records for the current statement:
|
Request Fetch End | 38 | Signifies that the Export operator
has fetched all of the records for the current request:
|
Export End | 39 | Signifies that the Export operator
has completed the export operation and displayed the number of
exported records:
|
Block Count | 40 | Signifies that the Export operator
has determined the block count:
This event is only available when the NoSpool mode is used for the answer set. |
Statement Fetch End | 41 | Signifies that the Export operator
has fetched all of the records for the current statement:
This event is only available when the value for the NotifyMethod attribute is set to 'Exit64' or 'ExitEON'. |
Request Fetch End | 42 | Signifies that the Export operator
has fetched all of the records for the current request:
This event is only available when the value for the NotifyMethod attribute is set to 'Exit64' or 'ExitEON'. |
Export End | 43 | Signifies that the Export operator
has completed the export operation and displayed the number of
exported records:
This event is only available when the value for the NotifyMethod attribute is set to 'Exit64' or 'ExitEON'. |
Request Submit End | 44 | Signifies that the Export operator
has received the response to the SELECT request:
This event is only available when the value for the NotifyMethod attribute is set to 'Exit64' or 'ExitEON'. |
Statement Fetch Begin | 45 | Signifies that the Export operator
is about to fetch the current statement in a request:
This event is only available when the value for the NotifyMethod attribute is set to 'Exit64' or 'ExitEON'. |
Block Count | 46 | Signifies that the Export operator
has determined the block count:
This event is only available when the value for the NotifyMethod attribute is set to 'Exit64' or 'ExitEON'. |
Initialize | 47 | Signifies successful processing of
the notify feature:
This event is only available when the value for the NotifyMethod attribute is set to 'ExitEON'. |
The following table lists events that create notifications.
Event | Notification Level | Signifies | ||
---|---|---|---|---|
Low | Medium | High | ||
Initialize | Yes | Yes | Yes | Successful processing of the notify option |
Teradata Database Restart | No | Yes | Yes | A crash error from the Teradata Database or the CLIv2 |
CLIv2 Error | Yes | Yes | Yes | A CLIv2 error was encountered |
Teradata Database Error | Yes | Yes | Yes | A Teradata Database error was encountered that terminates the Export operator |
Exit | Yes | Yes | Yes | The Export operator is terminating |
Export Begin | No | Yes | Yes | Opening the export file |
Request Submit Begin | No | Yes | Yes | Submitting the SELECT request |
Request Submit End | No | Yes | Yes | Received SELECT request response |
Request Fetch Begin | No | Yes | Yes | Fetching SELECT request results |
File or OUTMOD Open | No | No | Yes | Opening output file or OUTMOD |
Statement Fetch Begin | No | No | Yes | Fetching current statement |
Statement Fetch End | No | No | Yes | Last record fetched for current statement |
Request Fetch End | No | Yes | Yes | Last record fetched for current request |
Export End | No | Yes | Yes | Export task completed |