Aborting a Statement - Interactive Teradata Query Facility

Interactive Teradata Query User Guide

Product
Interactive Teradata Query Facility
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2452
Product Category
Teradata Tools and Utilities

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:

  • Enter the ABORT command (1)
  • The statement is aborted (2a) or the statement completes (2b)
  • Following the attempt (successful or unsuccessful) to perform the abort, you may:

  • Continue the ITEQ session (3a)
  • Disconnect the current session without leaving ITEQ (3b)
  • Exit ITEQ and return to TSO normally (3c)
  • Interrupt and exit ITEQ (4)
  •  

    Table 5: Aborting a Statement (TSO) 

    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):

  • Enter the ABORT command (1).
  • (The statement is aborted (2a) or the statement completes (2b).)

    After performing the abort, you may:

  • Continue the ITEQ session (3a)
  • Disconnect the current session without leaving ITEQ (3b)
  • Exit ITEQ and return to CMS (3c)
  • Interrupt ITEQ and enter the CP system (4a)
  • Return to ITEQ Interrupt Handler from CP (4b) and (4c)
  • Continue or abort the process or end or exit the session (4d)
  •  

    Table 6: Aborting a Statement (CMS) 

    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 Reset/(alt) PA1

    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 Enter or type ABORT;or LOGOFF;or QUIT;

    To continue processTo abort transactionTo end sessionTo exit ITEQ