I've a package that has a record type as OUT parameter..

TYPE CustIdInfoRec IS RECORD (
cust_taxId CHAR(10),
cust_entId VARCHAR2(21),
cust_type CHAR(4));
TYPE CustIdTyp IS TABLE OF CustIdInfoRec
INDEX BY BINARY_INTEGER;
PROCEDURE get_cust_ids (
batch_size IN INTEGER,
cust_type IN VARCHAR,
found IN OUT INTEGER,
done_fetch OUT INTEGER,
cust_idRec OUT CustIdTyp);

I'm trying to call this procedure from a c++ program. I tried declaring a structure with the same types as the record type in the SQL DECLARE section of the program. The precompiler complains about the variable (says it must be declared).

I've something like this..

EXEC SQL BEGIN DECLARE SECTION;
struct stIds {
char id[10],
varchar eid[21],
char type[3]};

struct stIds myIds;
EXEC SQL END DECLARE SECTION;

And then I'm passing it to the stored procedure.
Precompiler complains that "myIds" variable must be declared. The error occurs in the call to the stored procedure.

Thanks for the help!