If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Precompiler refuse int type in EXEC SQL BEGIN DECLARE SECTION

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 08:30
Dave Rush Dave Rush is offline
Registered User
 
Join Date: Jun 2004
Posts: 15
Precompiler refuse int type in EXEC SQL BEGIN DECLARE SECTION

I have a problem compiling my embedded sql:

db2 prep Dbprog.sqc bindfile gave me the following error.

172 SQL0008N The token "int" found in a host variable
declaration is not valid.


Is seems that the precompiler do not accept the int declarations, it accept only short or long. Is there a way to tell the precompiler to accept int variable like this

EXEC SQL BEGIN DECLARE SECTION;
int maj = 0;
int min = 0;
char pch = 0;
EXEC SQL END DECLARE SECTION;



Thanks

Last edited by Dave Rush; 07-06-04 at 09:04.
Reply With Quote
  #2 (permalink)  
Old 07-06-04, 12:07
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by Dave Rush
I have a problem compiling my embedded sql:

db2 prep Dbprog.sqc bindfile gave me the following error.

172 SQL0008N The token "int" found in a host variable
declaration is not valid.


Is seems that the precompiler do not accept the int declarations, it accept only short or long. Is there a way to tell the precompiler to accept int variable like this

EXEC SQL BEGIN DECLARE SECTION;
int maj = 0;
int min = 0;
char pch = 0;
EXEC SQL END DECLARE SECTION;



Thanks
No, long and short only. I assume this is because "int" can be different things to different compilers, etc.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #3 (permalink)  
Old 07-06-04, 12:19
Dave Rush Dave Rush is offline
Registered User
 
Join Date: Jun 2004
Posts: 15
Following Thread

Hello Jonathan,

Thanks for the killing answer I am dead know

Ok, Is it possible to change the precompiler for one that accept the int type ??

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On