XDB Server statements that are used in embedded and dynamic SQL programming are summarized below. While most SQL commands can be embedded in host programming languages (for example, COBOL, C and PL/I), the following commands can only appear as embedded or dynamic SQL statements.
Defines a cursor and associates it with a result set locator variable.
Gets the result set locator value for each result set returned by a stored procedure.
Marks the beginning of declarations for host variables to be used by SQL commands (optional in COBOL).
Runs stored procedures on the mainframe (through XDB Link), or procedures on an XDB Server, from an application.
Closes a previously opened cursor (OPEN command).
Defines a cursor.
Identifies prepared SQL statements for later use in application programs.
Provides the precompiler with information for checking embedded SQL statements. DECLARE TABLE is also used for application program documentation.
Obtains information about either a prepared statement (PREPARE command), or an existing table or view.
Obtains information about the result set that is associated with the cursor and places the information into a descriptor.
Obtains information about the result sets returned by a stored procedure, and places the information into a descriptor.
Marks the end of declarations for host variables to be used by SQL commands (required if BEGIN DECLARE SECTION statement is used).
Executes a prepared (PREPARE command) SQL statement.
Prepares (PREPARE command) and executes (EXECUTE command) an SQL statement in one step.
Positions a cursor on the next row of a result, and assigns the values of that row to host program variables.
Provides diagnostic information about the last SQL statement (other than a GET DIAGNOSTICS statement) that was executed.
Inserts declarations or code into a source program for use by SQL, as well as the host language.
Opens a previously prepared (PREPARE command) cursor prior to fetching (FETCH command) result rows.
Prepares an SQL statement for execution.
Retrieves one row of values from a table or view, and then assigns these values to one or more host variables specified in the SELECT INTO command statement.
Assigns special register values to host variables.
Specifies the host language statement to be executed whenever a specified exception condition takes place.