DESCRIBE
The DESCRIBE statement allows you to obtain information about parameters and other features of a prepared object before you execute it.
This statement is supported only on the IBM DB2 database.
General format
EXEC SQL [ AT Database ]
 
  DESCRIBE { INPUT  } Prepared-Statement INTO Sql-Descriptor
           { OUTPUT } 
 
END-EXEC
Syntax rules
1. iscobol.compiler.esql.db2 (boolean) must be set to ‘1’, ‘on’, ‘true’ or ‘yes’ in the Compiler configuration in order to compile this statement.
2. Prepared-Statement is a Nonnumeric Literal, as defined in the Definitions section of the Preface of this document.
3. Sql-Descriptor is a SQLDA structure.
General rules
1. The input INPUT keyword lets you receive information about input parameters.
2. The input OUTPUT keyword lets you receive information about output parameters.
Examples
Prepare a command and get information about it
exec sql
   prepare cmd from "select c1 from tbl where c1 = ?"
end-exec.
exec sql describe input cmd into :sqlda end-exec.