After a PREPARE statement, you can execute a DESCRIBE statement to retrieve information about the data type, length and column name of each column returned by the specified prepared statement. This information is returned in the SQL Descriptor Area (SQLDA):
EXEC SQL DESCRIBE stmt1 INTO :sqlda END-EXEC
If you want to execute a DESCRIBE statement immediately after a PREPARE statement, you can use the INTO option on the PREPARE statement to perform both steps at once:
EXEC SQL PREPARE stmt1 INTO :sqlda FROM :stmtbuf END-EXEC