|
View previous topic :: View next topic
|
| Author |
Message |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Hi
I'm trying to fetch a field with type DECIMAL(6,0) to a cobol variable of type S9(6)v USAGE COMP-3. The data type I took from the DCLGEN of the table but still I'm getting -303 (ie data types not compatible) during the fetch.
Please advise.
The field is a NOT NULL.
Thanks
SR |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
| Show the dclgen definition of the column and cobol definition of the host variable and the select statement. Something very basic is wrong. |
|
| Back to top |
|
 |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Hi
Thanks for the reply.. here are the details..
DB2 DEFINITIONS:
DACNCNT DECIMAL(6, 0) NOT NULL
COBOL DECLARION:
01 WS-ACN-CNT PIC S9(6)V USAGE COMP-3.
CURSOR:
DECLARE C1 CURSOR SELECT DACNCNT FROM TBS0101
FETCH:
FETCH C1 INTO :WS-ACN-CNT
ERROR:
SEVERE ERROR OR WARNING ENCOUNTERED...
SQLCODE =-0000303
SQLERRMC =11
SQLSEQUENCE = 0002
SQLERRD(3) = 0000000
SQLWARN0 =
SQLWARN1 =
SQLWARN2 =
SQLWARN3 =
SQLWARN4 =
SQLWARN5 =
SQLWARN6 =
SQLWARN7 =
Thanks
SR |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
what is the COBOL definition from the DCLGEN?
Try making the USAGE of the COBOL field COMP. |
|
| Back to top |
|
 |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
COBOL definitino from DCLGEN is S9(6)V USAGE COMP-3. Infact I used the same.
Yes I tried making COMP-3 to COMP. Its of no use..
-SR |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
| Do the columns and host variables for the where clause of your cursor also match up properly? |
|
| Back to top |
|
 |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
| Yes.. i'm just selecting one column.. and the corresponding host variable is mentioned in the fetch. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
| deleted by poster |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
| I have a strange feeling that some thing is missing or mistyped since cut and paste doesn't appear to be used. Are you sure the DCLGEN matches the table? |
|
| Back to top |
|
 |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
| yes.. I made sure that the type is same.. huh! looking strange! I tried with all data types.. nothing works during run time |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What happens if you try to use some other column from that table?
What happens if you try to select this column in spufi? |
|
| Back to top |
|
 |
|
|