This section describes the statements for which the syntax required by OpenAPI differs from that of embedded SQL.
This statement has the following syntax in OpenAPI:
describe statement_name
Do not include an into or using clause.
This statement has the following syntax in OpenAPI:
execute statement_name
Do not include a using clause.
The declare cursor statement is not supported; the information associated with declare cursor is provided when the cursor is opened.
This statement has the following syntax in OpenAPI:
statement_name | select_statement [for readonly]
The open cursor syntax consists of the statement name or select statement text which in embedded SQL would be provided in the declare cursor statement, along with an optional for readonly clause. Do not include a using clause with the open cursor query. The application can provide a cursor name as a parameter to the open cursor query. If the application does not provide a cursor name, a default name of the form IIAPICURSORn (where n is an integer) is used.
This statement has the following syntax in OpenAPI:
delete from tablename
Do not include a where clause. The application provides the cursor ID as a parameter to the cursor delete query. The cursor ID is the statement handle returned when the cursor is opened. OpenAPI builds the where clause using the information in the cursor ID.
This statement has the following syntax in OpenAPI:
update tablename set_clause
Do not include a where clause. The application provides the cursor ID as a parameter to the cursor update query. The cursor ID is the statement handle returned when the cursor is opened. OpenAPI builds the where clause using the information in the cursor ID.
OpenAPI does not require any query text to execute a database procedure. The application provides the database procedure name, procedure owner, and procedure parameters as parameters to the query and sets the query type to IIAPI_QT_EXEC_PROCEDURE. A database procedure can be executed as a regular query with query type IIAPI_QT_QUERY using the non-dynamic syntax, but procedure return values and output parameters are not available.
OpenAPI does not support the repeated keyword in delete, insert, select, and update statements. Repeat queries are supported in OpenAPI using the same underlying mechanism as used by embedded SQL. While embedded SQL hides the repeat query mechanism from the application, OpenAPI applications must manage this mechanism themselves.]
Using Repeat Queries with OpenAPI describes how an OpenAPI application can use repeat queries.