07-15-04, 10:44 #1Registered User
- Join Date
- Jun 2004
Unanswered: Db2 Prep Preprocessor Option Not Working
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 ??
07-15-04, 14:20 #2Registered User
- Join Date
- Mar 2004
- Toronto, ON, Canada
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.--
DB2 Database Consultant