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 > Db2 Prep Preprocessor Option Not Working

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-15-04, 09:44
Dave Rush Dave Rush is offline
Registered User
 
Join Date: Jun 2004
Posts: 15
Db2 Prep Preprocessor Option Not Working

Hi All,

I need to pass some environment variables to the db2 prep

I found the following command but i still have the problem:



db2 prep DBConnect.sqc bindfile PREPROCESSOR \"gcc -DCOMPDB2 -c DBConnect.sqc\"

`EXEC' undeclared (first use in this function)
myprogram.sqc:34: (Each undeclared identifier is reported only once
myprogram.sqc:34: for each function it appears in.)
myprogram.sqc:34: parse error before `SQL'
myprogram.sqc:39: parse error before `SQL'
myprogram.sqc:55: parse error before `SQL'
myprogram.sqc: In function `releaseDB':
myprogram.sqc:69: `EXEC' undeclared (first use in this function)
myprogram.sqc:69: parse error before `SQL'
myprogram.sqc:72: parse error before `SQL'



Any idea ??
Reply With Quote
  #2 (permalink)  
Old 07-15-04, 13:20
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
I'm a bit confused as to what you're trying to do here... the PREPROCESSOR option shouldn't contain your actual compilation command, otherwise you're compiling your original source which will fail. That's the whole point of PREP - to change the embedded SQL statements into compilable function calls, variable definitions, etc.
__________________
--
Jonathan Petruk
DB2 Database Consultant
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