By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,610 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,610 IT Pros & Developers. It's quick & easy.

I need help

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.