Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: RE: Testing rerad cursor for status with predicate

$
0
0
Author: Rohit Umarjikar
Posted: Fri May 19, 2017 10:04 pm (GMT 5.5)

Do you know about cursor WITH HOLD option?
Why do you want to code around-501?

Quote:
IF READCUR IS OPEN
This is not true you need to check SQLCODE against -501 in IF condition.
like
step1- open cursor
step2 - if <the cursor is already open> then check SQLCODE against -502 and do else do something end
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif


Viewing all articles
Browse latest Browse all 8500

Trending Articles