Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    15

    Unanswered: 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 ??

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •