Show TOC

RESUME StatementLocate this document in the navigation structure

Resumes execution of a procedure that returns result sets.

Syntax

Syntax 1 – Supported in dbisqlc.

RESUME <cursor-name>

Syntax 2 – Supported in dbisql.

RESUMEALL ]
Parameters

(back to top)

  • cursor-name

    identifier or host-variable

Examples

(back to top)

  • Example 1 embedded SQL examples:
    EXEC SQL RESUME cur_employee;

    and

    EXEC SQL RESUME :cursor_var;
  • Example 2

    dbisql example:

    CALL sample_proc() ;
    RESUME ALL;
Usage

(back to top)

The procedure executes until the next result set (SELECT statement with no INTO clause) is encountered. If the procedure completes and no result set is found, the SQLSTATE_PROCEDURE_COMPLETE warning is set. This warning is also set when you RESUME a cursor for a SELECT statement.

Syntax 1 – supported in dbisqlc but not dbisql (Interactive SQL) or when connected to the database using the SAP SQL Anywhere JDBC driver.

Syntax 2 – supported in dbisql. Resumes the current procedure. If ALL is not specified, executing RESUME displays the next result set or, if no more result sets are returned, completes the procedure. In dbisql, the RESUME ALL statement cycles through all result sets in a procedure, without displaying them, and completes the procedure. This is useful mainly in testing procedures.

Standards

(back to top)

  • SQL—Vendor extension to ISO/ANSI SQL grammar.
  • SAP Database products—Not supported by SAP ASE.
Permissions

(back to top)

The cursor must have been previously opened.