View previous topic :: View next topic
|
Author |
Message |
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
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 |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
Back to top |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
A -302 suggests a mismatch between host variable and column (or parameter) definitions; please show each. |
|
Back to top |
|
|
|
|