hi experts,
i'm new to db2....n having a problem pre-compiling this sample code from ibm site...
the problem is in begin declare section .....
************************************************** ***************
EXEC SQL BEGIN DECLARE SECTION;
double inMedianSalary=0;
sqlint16 nullind;
char name[256],
job[256];
float salary;
line 87 : static volatile SQL TYPE IS RESULT_SET_LOCATOR *loc1, *loc2,*loc3;
struct sqlda *proc_da;
/* SQLDA for DESCRIBE PROCEDURE */
struct sqlda *res_da;
/* SQLDA for DESCRIBE CURSOR *
EXEC SQL END DECLARE SECTION;
************************************************** **************
the precomplier says......
87 SQL0008N The token "*" found in a host variable
declaration is not valid.
139 SQL4911N The host variable data type is not valid.
SQL0095N No bind file was created because of previous
(same for all the three pointer variables....)
help me ....if u know what might be wrong...i checked syntax in various documents...it seems right to me....
thanks in advance.....
i'm new to db2....n having a problem pre-compiling this sample code from ibm site...
the problem is in begin declare section .....
************************************************** ***************
EXEC SQL BEGIN DECLARE SECTION;
double inMedianSalary=0;
sqlint16 nullind;
char name[256],
job[256];
float salary;
line 87 : static volatile SQL TYPE IS RESULT_SET_LOCATOR *loc1, *loc2,*loc3;
struct sqlda *proc_da;
/* SQLDA for DESCRIBE PROCEDURE */
struct sqlda *res_da;
/* SQLDA for DESCRIBE CURSOR *
EXEC SQL END DECLARE SECTION;
************************************************** **************
the precomplier says......
87 SQL0008N The token "*" found in a host variable
declaration is not valid.
139 SQL4911N The host variable data type is not valid.
SQL0095N No bind file was created because of previous
(same for all the three pointer variables....)
help me ....if u know what might be wrong...i checked syntax in various documents...it seems right to me....
thanks in advance.....
Comment