This statement can be embedded in an application program only. It is an executable statement that cannot be dynamically prepared.
No authorization is required for this statement.
DESCRIBE PROCEDURE {procedure-name | host-variable} INTO descriptor-name
procedure-name | Identifies the stored procedure to describe by the specified procedure name. |
host-variable | Identifies the stored procedure to describe by the procedure name contained in the host variable. |
descriptor-name | Identifies an SQL descriptor area (SQLDA). The information returned in the SQLDA describes the result sets returned by the stored procedure. Considerations for allocating and initializing the SQLDA are similar to those for DESCRIBE TABLE. |
The statements in the following examples are assumed to be in PL/I programs.
Place information about the result sets returned by stored procedure P1 into the descriptor named by SQLDA1. Assume that the stored procedure is called with a one-part name from current server SITE2.
EXEC SQL CONNECT TO SITE2; EXEC SQL CALL P1; EXEC SQL DESCRIBE PROCEDURE P1 INTO :SQLDA1;
Description
When the DESCRIBE PROCEDURE statement is executed, the procedure name or specification must identify a stored procedure that the requestor has already invoked by using a CALL statement.
A procedure name is a qualified or unqualified name. Each part of the name is a long SQL identifier that must be composed of SBCS characters:
If a host variable is used:
The procedure name in the DESCRIBE PROCEDURE statement must be specified the same way that it was specified on the CALL statement. For example, if a two-part name was specified on the CALL statement, you must use a two-part name in the DESCRIBE PROCEDURE statement. However, there is one condition under which the names do not have to match. If the CALL statement was made with a three-part name and the current server is the same as the location in the three-part name, you can omit the location name and specify a two-part name.