Aborting a Statement
If you want to terminate processing of a Teradata SQL statement after the statement is entered but before processing is completed, execute the ITEQ ABORT command.
Executing the ABORT command has much the same effect as entering the Teradata SQL ROLLBACK (ABORT) statement, described in SQL Data Definition Language. That is, it aborts the current transaction and rolls back any affects it may have had on the database. However, the Teradata SQL ROLLBACK statement is used within a macro or a transaction that is processed by a language preprocessor to abort a transaction unconditionally in response to an error condition. The ABORT command, by contrast, is used interactively—and may not be executed in time to stop a transaction. (Refer to item 3 in the dialogue described in Table 5 and Table 6, later in this chapter).
If the statement aborted by the ABORT command is a data definition or data manipulation statement, any change made to the database is backed out. For a SELECT statement, any result is deleted. Locks on the database that were initiated by the aborted statement are released. (For information on lock types and modes, refer to Database Administration [B035-1093].)
The simplest way to execute the ABORT command is to press a PF key assigned to the command via a startup string, as described earlier.
Aborting a Statement Under MVS/TSO
You may abort processing of the current Teradata SQL statement as described in Table 5:
Following the attempt (successful or unsuccessful) to perform the abort, you may:
Action |
System Response |
Status Message |
(Statement to be aborted is entered) |
Begins processing statement |
“COMMAND IN PROGRESS” |
1. Enter ABORT; |
Attempts to abort processing of current statement |
“ABORT COMMAND ID PROCESS” |
2a. (statement is aborted) |
Displays “3110 The transaction was aborted by the user” |
“READY FOR COMMAND” |
2b. (Statement completes) |
Returns normal processing result |
“ABORT COMMAND IS IGNORED. READY FOR COMMAND” |
3a. Enter new statement or command |
Processes new statement or command |
“COMMAND IN PROCESS” |
3b. Enter LOGOFF; |
Ends the current session but remains in ITEQ, ready for a LOGON command |
“READY FOR COMMAND” |
3c. Enter QUIT; |
Exits ITEQ normally; displays |
“READY” |
4. Press (alt) PA1 |
Interrupts/terminates ITEQ |
|
Aborting a Statement Under VM/CMS
You may abort processing of the current Teradata SQL statement by performing the following actions (described in Table 6):
(The statement is aborted (2a) or the statement completes (2b).)
After performing the abort, you may:
Action |
System Response |
Status Message |
(Statement to be aborted is entered) |
Begins processing statement |
“COMMAND IN PROCESS” |
1. Enter ABORT; |
Attempts to abort processing of current statement |
“ABORT COMMAND IN PROCESS” |
2a. (Statement is aborted) |
Displays “3110 The transaction was aborted by the user” |
“READY FOR COMMAND” |
2b. (Statement completes) |
Returns normal processing result |
“ABORT COMMAND IS IGNORED. READY FOR COMMAND” |
3a. Enter new statement or command |
Processes new statement or command |
“COMMAND IN PROCESS” |
3b. Enter LOGOFF; |
Ends the current session but remains in ITEQ, ready for a LOGON command |
“READY FOR COMMAND” |
3c. Enter QUIT; |
Exits ITEQ normally, displays |
“RUNNING” |
4a. Press |
Interrupts ITEQ and enters CP |
CP READ |
4b. Type #CP BEGIN |
|
MORE... |
4c. Press (alt) PA1 |
Returns to ITEQ from CP |
“ITEQ ATTENTION HANDLING (Enter/Abort/Logoff/Quit).” |
4d. Press |
To continue processTo abort transactionTo end sessionTo exit ITEQ |
|