IBM Db2 - The Ultimate Database for Cloud, Analytics & Mobile
Hi there,
I am testing this stored procedure using Db2 11.1 on Windows 10 64-bit.
Informational tokens are "DB2 v11.1.4050.859", "s1911120100",
"DYN1911120100WIN64", and Fix Pack "5".
For NO_DATA_FOUND exception I am getting SQLSTATE = 'ORANF' but in the example below its checking for '02000'.
Is this correct or am I missing something ?
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0053697.html
Thanks.
Regards,
Gagan
Tags:
Hi Gagan,
Not sure you got or not. If not,
As DB2 UDB supports SQL Pl and Oracle PL/SQL procedures. First set compatibility to "ORACLE"
1. db2set DB2_COMPATIBILITY_VECTOR=ORA.
2. stop db2 instance db2stop
3. restart db2 instance db2start
4. Inform db2 instance, that your input file is located T below location using the below procedure.
connect to sample;
CALL SYSIBMADM.UTL_DIR.CREATE_OR_REPLACE_DIRECTORY('empdir', 'C:\temp');
and compile your procedure again with
DECLARE CONTINUE HANDLER FOR SQLSTATE 'ORANF' SET SQLSTATE1 = SQLSTATE;
If any questions let me know.
Rgds,
Thiru Swamy
thiruswamy@gmail.com
Hi Thiru,
Thank you for your reply.
Well, I sorted this one out a while back just by replacing SQLSTATE '02000' with SQLSTATE 'ORANF' as mentioned in the Version 9.7 example.
I already have DB2_COMPATIBILITY_VECTOR set to 'ORA'.
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm...
Regards,
Gagan
Bringing Db2 enthusiasts together virtually. Expert or novice, distributed or mainframe, this is the place for everything DB2.
Started by long lin in What's hot ? 19 hours ago. 0 Replies 0 Likes
fotbollströja barn eget tryck Lionel Messi opened the scoring from the penalty spot, but that was as good as it got for Ronald Koeman's side as Mbappe took over to evoke memories of recent defeats to…Continue
Started by blon sin in What's hot ? yesterday. 0 Replies 0 Likes
New York, April 20, 2021 - The primary reason for the failure of startups is not lack of funding or intense competition. The main reason is "misunderstanding of market demand."Therefore, for start-ups, it is important to thoroughly study the…Continue
© 2021 Created by Surekha Parekh.
Powered by