Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    5

    Unhappy Unanswered: DB2PreProcessor problem

    I am using the DB2PreProcessor on OS-390 z/OS.
    The very simple program shown below fails:

    #include <sqlca.h>
    EXEC SQL INCLUDE SQLCA;
    int main(int argc, char *argv[]) {

    EXEC SQL BEGIN DECLARE SECTION ;
    char st[80];
    EXEC SQL END DECLARE SECTION ;

    EXEC SQL PREPARE s1 FROM :st ;
    }

    The error that it gives is:
    DSNH080I E DSNHSM3D LINE 9 COL 28 STRING VARIABLE "st" IS NOT "VARCHAR" TYPE

    Does anyone know what is going on?

  2. #2
    Join Date
    Apr 2002
    Posts
    18
    Is it that you have defined st as CHAR, the error message is requesting it be VARCHAR

  3. #3
    Join Date
    Nov 2003
    Posts
    5
    Originally posted by gregsimpson
    Is it that you have defined st as CHAR, the error message is requesting it be VARCHAR
    No, I tried that. The pre-compiler does not recognize VARCHAR as a data type.

  4. #4
    Join Date
    Feb 2003
    Posts
    20
    I would suggest you precompile and compile a sample program(Which comes with the DB2 product) and use the sample compile JCL. I think something is wrong with your compile options.

Posting Permissions

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