SQL/MX Comparison Guide for SQL/MP Users

Embedded SQL
HP NonStop SQL/MX Comparison Guide for SQL/MP Users523735-003
4-7
Descriptor Area
NonStop SQL/MX provides for the allocation of a descriptor area with the use of
SQL:1999 dynamic SQL statements. This descriptor area consists of multiple item
descriptor areas, together with a count of the number of those item descriptor areas.
For further information about using the descriptor area, see Descriptor Area on
page 4-7.
The next list summarizes the dynamic SQL statements that you use with an SQL/MX
descriptor area. For information about the syntax and use of these statements, see the
SQL/MX Reference Manual.
Descriptor Area
NonStop SQL/MP provides a descriptor area (SQLDA) that enables a dynamic SQL
application to exchange information with the database about input parameters and
output columns. You can declare the descriptor area by using the INCLUDE SQLDA
directive.
NonStop SQL/MX does not provide the SQLDA as does NonStop SQL/MP and does
not provide the INCLUDE SQLDA directive. However, NonStop SQL/MX does provide
an SQL descriptor area for dynamic SQL, which consists of multiple item descriptor
areas, together with a count of the number of those item descriptor areas.
In NonStop SQL/MX, you must allocate and deallocate input and output SQL
descriptor areas by using the ALLOCATE DESCRIPTOR and DEALLOCATE
ALLOCATE DESCRIPTOR Allocates an input or output SQL descriptor area.
DEALLOCATE DESCRIPTOR Deallocates an SQL descriptor area.
GET DESCRIPTOR Retrieves information from an SQL descriptor
area—the COUNT of the item descriptor areas and
specified fields in the areas.
SET DESCRIPTOR Modifies information in an SQL descriptor area.
PREPARE Prepares (compiles) a dynamic SQL statement for
subsequent execution by an EXECUTE statement.
DEALLOCATE PREPARE Deallocates a prepared statement and returns the
system resources used by the statement; also
allows you to reuse the name of the statement.
DESCRIBE [OUTPUT] Stores in the output descriptor area information
about output values (usually SELECT columns)
from a prepared statement.
DESCRIBE INPUT Stores in the input descriptor area information
about dynamic input parameters for a prepared
statement.
EXECUTE Executes a prepared dynamic SQL statement.
EXECUTE IMMEDIATE Prepares (compiles) and executes a dynamic SQL
statement.