Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Posts
    26

    Unanswered: Getting error while compiling SQC file in window OS

    Hi,
    I have a statement like "static SQL TYPE IS CLOB(12000) cCmt = {0};"
    in sqc (embeded C stored procedure) file. It is getting compiled in IBM AIX OS.

    Details about UNIX env:
    UNIX OS: IBM AIX
    Compiler: xlc 64 bit
    Database version: db2 9.5

    But while compiling in windows , getting below error
    SQL0314N The host variable "cCmt" is incorrectly declared
    Details about windowos env:
    Compiler: cl (MS visual studio)
    Database version: db2 9.5

    Please suggest how to resolve the issue.

    Thanks
    Surjya

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Have you tried using SQL_CLOB_INIT to initialize the member? Declaration of large object type host variables in C and C++ embedded SQL applications. Another thing to try is removing the "static" keyword and placing the variable on the stack. (That would be good as well in case you have a multi-threaded application or will move towards that in the future.) And then SQL0314 suggests to not use an initializer at all.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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