Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 158
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: 158
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: 1714
Location: 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: 158
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: 1738
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: 158
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: 1738
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us