467,154 Members | 866 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,154 developers. It's quick & easy.

I need help

Hi to all NG

I write a *.sqc program. In this program I 'ld like to declare a struct in
the declare section, but during the precompile the system told me :
48 SQL0008N The token "[" found in a host variable declaration is not
valid.

someone can you help me ?

EXEC SQL BEGIN DECLARE SECTION;
struct inv_da_sviluppare {
long nvt_numero_documento ;
short ind_nvt_numero_documento;
char nvt_data_inventario[10+1];
short ind_nvt_data_inventario;
char nvt_ora_esecuzione[5+1];
char ind_nvt_ora_esecuzione;
char presente ;
struct dettaglio {
char tipo_valore ;
char valore[50+1];
char nome_campo[30+1];
} in_lista[1500] ;
} lista_1[100] ;
EXEC SQL END DECLARE SECTION ;

Apr 11 '06 #1
  • viewed: 1833
Share:
2 Replies
eap90210 wrote:
Hi to all NG

I write a *.sqc program. In this program I 'ld like to declare a struct in
the declare section, but during the precompile the system told me :
48 SQL0008N The token "[" found in a host variable declaration is not
valid.

someone can you help me ?

EXEC SQL BEGIN DECLARE SECTION;
struct inv_da_sviluppare {
long nvt_numero_documento ;
short ind_nvt_numero_documento;
char nvt_data_inventario[10+1];
short ind_nvt_data_inventario;
char nvt_ora_esecuzione[5+1];
char ind_nvt_ora_esecuzione;
char presente ;
struct dettaglio {
char tipo_valore ;
char valore[50+1];
char nome_campo[30+1];
} in_lista[1500] ;
} lista_1[100] ;
EXEC SQL END DECLARE SECTION ;


You have to use separate host variables as structures are not supported.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Apr 11 '06 #2
Best thanks for your answer
regards
sergio pipitone

"Knut Stolze" <st****@de.ibm.com> ha scritto nel messaggio
news:e1**********@lc03.rz.uni-jena.de...
eap90210 wrote:
Hi to all NG

I write a *.sqc program. In this program I 'ld like to declare a struct
in
the declare section, but during the precompile the system told me :
48 SQL0008N The token "[" found in a host variable declaration is
not
valid.

someone can you help me ?

EXEC SQL BEGIN DECLARE SECTION;
struct inv_da_sviluppare {
long nvt_numero_documento ;
short ind_nvt_numero_documento;
char nvt_data_inventario[10+1];
short ind_nvt_data_inventario;
char nvt_ora_esecuzione[5+1];
char ind_nvt_ora_esecuzione;
char presente ;
struct dettaglio {
char tipo_valore ;
char valore[50+1];
char nome_campo[30+1];
} in_lista[1500] ;
} lista_1[100] ;
EXEC SQL END DECLARE SECTION ;


You have to use separate host variables as structures are not supported.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany

Apr 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by mike | last post: by
5 posts views Thread by John Flynn | last post: by
reply views Thread by xunling | last post: by
7 posts views Thread by Timothy Shih | last post: by
8 posts views Thread by skumar434@gmail.com | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.