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 > DB2PreProcessor problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-31-03, 12:24
parrisgeiser parrisgeiser is offline
Registered User
 
Join Date: Nov 2003
Posts: 5
Unhappy 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?
Reply With Quote
  #2 (permalink)  
Old 01-06-04, 13:13
gregsimpson gregsimpson is offline
Registered User
 
Join Date: Apr 2002
Posts: 18
Is it that you have defined st as CHAR, the error message is requesting it be VARCHAR
Reply With Quote
  #3 (permalink)  
Old 01-07-04, 15:39
parrisgeiser parrisgeiser is offline
Registered User
 
Join Date: Nov 2003
Posts: 5
Quote:
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.
Reply With Quote
  #4 (permalink)  
Old 01-07-04, 15:53
anil4321 anil4321 is offline
Registered User
 
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.
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