Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 Bind error SQLCODE -440

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 Bind error SQLCODE -440
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    Post subject: Reply to: DB2 Bind error SQLCODE -917
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: 2230
Location: Hampshire, UK

PostPosted: Wed Aug 14, 2013 1:12 pm    Post subject:
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    Post subject:
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: 1789
Location: Bloomington, IL

PostPosted: Wed Aug 14, 2013 3:19 pm    Post subject:
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    Post subject: Reply to: DB2 Bind error SQLCODE -917
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: 1789
Location: Bloomington, IL

PostPosted: Wed Aug 14, 2013 4:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Not seeing the error panel )ATTR Harold Barnes TSO/ISPF 4 Fri Sep 20, 2019 10:56 am
No new posts End the job into error / abend state wik123 JCL & VSAM 3 Wed Sep 11, 2019 6:37 pm
No new posts WER027A Error Chinnadu SYNCSORT 8 Thu Aug 29, 2019 11:58 am
No new posts ISRE771 error while invoking macros pkmurali CLIST & REXX 4 Mon Aug 26, 2019 7:59 pm
No new posts data conversion error maxsubrat PL/I & Assembler 4 Thu May 09, 2019 10:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us