
DESCRIBE CALL (Db2 command line processor)
The DESCRIBE CALL command returns information about the parameters of a stored procedure.
For each parameter, DESCRIBE CALL returns the following information:
- Parameter name
- Parameter type: IN, OUT, or INOUT
- Data type
- Length
- Scale
- Nullability: yes, no, or unknown
- schema-name
- The schema name of the stored procedure for which parameter information is returned. The default is the user ID under which the Db2 command line processor session is running.
- procedure-name
- The name of the stored procedure for which parameter information is returned.
- Example: Displaying parameter information for the SYSPROC.DSNUTILU stored procedure
- Suppose that you want to display information about the Db2-supplied SYSPROC.DSNUTILU stored
procedure. You do not want the output to wrap on your display, so you want the column widths
in the output to be at most 12 bytes. Use these commands to set the column width and display
the parameter
information:
CHANGE MAXCOLUMNWIDTH TO 12 DISPLAY CALL SYSPROC.DSNUTILU
The following information is displayed:
COLUMN_NAME COLUMN_TYPE TYPE_NAME PRECISION LENGTH SCALE NULLABLE UTILITY_ID 1 VARCHAR 16 16 <null> 0 RESTART 1 VARCHAR 8 8 <null> 0 UTSMT 1 CLOB
2147483647
2147483647
<null> 0 RETCODE 4 INTEGER 10 4 <null> 0 Mapping information for COLUMN_TYPE
- 0 - Unknown
- 1 - IN parameter
- 2 - INOUT parameter
- 3 - Result column in ResultSet
- 4 - OUT parameter
- 5 - Procedure return value
Mapping information for NULLABLE
- 0 - Does not allow NULL values
- 1 - Allow NULL values
- 2 - Nullability unknown
