Icon ABORTED

Returns whether or not a the current execution has been aborted as a response to a progress update.

Syntax
ABORTED()

Returns
BOOLEAN

Usage
The ABORTED function returns whether or not the current execution has been aborted as the result of a progress update executed via the SET PROGRESS statement.

Examples
-- This procedure uses a SET PROGRESS
-- statement to display progress during its
-- execution and uses the ABORTED function
-- to abort the execution if the application
-- requests it

CREATE PROCEDURE UpdateState()
BEGIN
   DECLARE CustCursor CURSOR WITH RETURN FOR Stmt;
   DECLARE State CHAR(2) DEFAULT '';
   DECLARE TotalRows INTEGER DEFAULT 0;
   DECLARE NumRows INTEGER DEFAULT 0;

   PREPARE Stmt FROM 'SELECT * FROM Customer';

   OPEN CustCursor;
   SET TotalRows=ROWCOUNT(CustCursor);

   START TRANSACTION ON TABLES 'Customer';
   BEGIN

      FETCH FIRST FROM CustCursor ('State') INTO State;

      WHILE (NOT (EOF(CustCursor) OR ABORTED)) DO
         IF (State='FL') THEN
            UPDATE CustCursor SET 'State'='NY';
         END IF;
         FETCH NEXT FROM CustCursor ('State') INTO State;
         SET NumRows=NumRows+1;
         SET PROGRESS TO TRUNC(((NumRows/TotalRows)*100));
      END WHILE;

      IF (NOT ABORTED) THEN
         COMMIT;
      ELSE
         ROLLBACK;
      END IF;

   EXCEPTION
      ROLLBACK;
   END;
END

SQL 2003 Standard Deviations
This function deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis function is an ElevateDB extension.
Image