IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Bind error SQLCODE -440


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Wed Aug 14, 2013 11:43 am
Reply with quote

Hi,

I was getting -302 for certain records when i try to insert it into table.

This is because i have values in the file like Î, É, é

In the insert query I first tried with following code.

Code:

EBCDIC_STR(:ADDR1)     
EBCDIC_STR(:ADDR2)     
EBCDIC_STR(:ADDR3)     
EBCDIC_STR(:ADDR-ST)   


then
Code:

UNICODE_STR(:ADDR1)     
UNICODE_STR(:ADDR2)     
UNICODE_STR(:ADDR3)     
UNICODE_STR(:ADDR-ST)   

Both the cases I am getting the below error.

Code:

SQLNQ25E                                                           
           SQLCODE  = -440                                         
           SQLSTATE = 42884                                         
           SQLERRMT = UNICODE_STR FUNCTION                         
           SQLWARN    0= ,1= ,2= ,3= ,4= ,5= ,6= ,7= ,8= ,9= ,A=   
           STATEMENT= 958 


Local bind is getting success, remote bind which is UDB DB2 getting failed.
I am tring to bind it from mainframes.

Please advice for any other options or solution.

Regards,
Magesh
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Wed Aug 14, 2013 11:56 am
Reply with quote

All the three fields are of below type

ADDR1 CHAR(25) NOT NULL,
ADDR2 CHAR(25) NOT NULL,
ADDR3 CHAR(25) NOT NULL,
ADDR_ST CHAR(2) NOT NULL,

regards,
Magesh
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 14, 2013 1:12 pm
Reply with quote

How does the -917 in the topic title come into this? The only code you show is -440. How about showing the messages from the remote bind?

And you have 4 fields not 3.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Wed Aug 14, 2013 2:59 pm
Reply with quote

Sorry, Its my mistake..
Please find the below error messages, I have taken the other sql code.
440 is the right sql code.
Code:

DSNT270I  - THE FOLLOWING SQLCA INFORMATION WAS RETURNED FROM             
SQLRA12F                                                                   
           SQLCODE  = 20                                                   
           SQLSTATE =                                                     
           SQLERRMT = STRDEL DECDEL RELEASE DBPROTOCOL                     
           SQLWARN    0= ,1= ,2= ,3= ,4= ,5= ,6= ,7= ,8= ,9= ,A=           
DSNT271I  - THE FOLLOWING SQLCA INFORMATION WAS RETURNED FROM             
SQLNQ25E                                                                   
           SQLCODE  = -440                                                 
           SQLSTATE = 42884                                               
           SQLERRMT = UNICODE_STR FUNCTION                                 
           SQLWARN    0= ,1= ,2= ,3= ,4= ,5= ,6= ,7= ,8= ,9= ,A=           
           STATEMENT= 958                                                 
DSNT270I  - THE FOLLOWING SQLCA INFORMATION WAS RETURNED FROM             
SQLRR0D0                                                                   
           SQLCODE  = -917                                                 
           SQLSTATE = 42969                                               
           SQLERRMT =                                                     
           SQLWARN    0= ,1= ,2= ,3= ,4= ,5= ,6= ,7= ,8= ,9= ,A=           
DSNT233I  - UNSUCCESSFUL BIND FOR                                         
           PACKAGE =                                                       


Bind details
Code:

BIND PLAN (PLANTTT)OWNER(OWNER12) QUALIFIER(ZZZZZZ)NODEFER(PREPARE)       VALIDATE(BIND)        FLAG(I)ISOLATION(CS)   
      CACHESIZE(0)          CURRENTDATA(YES)DEGREE(1)              SQLRULES(DB2)         ACQUIRE(USE)RELEASE(COMMIT)   
    EXPLAIN(NO)           DYNAMICRULES(RUN)NOREOPT(VARS)          KEEPDYNAMIC(NO)       IMMEDWRITE(NO)DBPROTOCOL(DRDA) 
     ENCODING(500)DISCONNECT(EXPLICIT)PKLIST(*.ZZZZZZ.*)MEMBER(PROG1234)ENABLE(*)ACTION(REPLACE)        RETAIN         
DSNT252I  - DSNTBCM1 BIND OPTIONS FOR PLAN PLANTTT


Regards,
Magesh
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 14, 2013 3:19 pm
Reply with quote

SQLCODE -917 merely indicates that the bind failed. The real error is the SQLCODE -440, which indicates that no compatible routine could be found.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Wed Aug 14, 2013 3:30 pm
Reply with quote

Thanks for the information, please advice how to handle the situation.

Any other scalar function to prevent this 302 abend, or other words any other ways to make the table to accept the special characters ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 14, 2013 4:12 pm
Reply with quote

A -302 suggests a mismatch between host variable and column (or parameter) definitions; please show each.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top