IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible of getting 100 for open cursor


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yasodha_p

New User


Joined: 03 Apr 2008
Posts: 14
Location: Chennai

PostPosted: Thu May 07, 2009 2:35 pm
Reply with quote

Hi,

My program contains Declare statement of cursor with fetch only option.
The table is empty .

When that cursor is in Opened, program is abending.

My question " Is it possible of getting 100 for open cursor?"
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu May 07, 2009 4:05 pm
Reply with quote

Quote:
When that cursor is in Opened, program is abending.
Please post the error code and messages from job log.

Quote:
Is it possible of getting 100 for open cursor?"
Do you mean SQLCODE +100 at the time of opening cursor?
Back to top
View user's profile Send private message
yasodha_p

New User


Joined: 03 Apr 2008
Posts: 14
Location: Chennai

PostPosted: Thu May 07, 2009 4:57 pm
Reply with quote

Hi,
Thank you for the reply.
Yes, +100 only. I resolved my problem.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Thu May 07, 2009 6:53 pm
Reply with quote

yasodha_p wrote:
Hi,
Thank you for the reply.
Yes, +100 only. I resolved my problem.


could you please share the way you have solved the problem?
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Thu May 07, 2009 7:13 pm
Reply with quote

Yasodha,nice to hear that it got resolved.
Wanted to know if your Cursor was making use of GROUP BY or an ORDER BY clause and how actually you resolved this issue.

Thanks.
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri May 08, 2009 12:22 pm
Reply with quote

Yasodha,
Only after fetching, we will come to know the result whether 0 or 100 or other sqlcodes.
Back to top
View user's profile Send private message
yasodha_p

New User


Joined: 03 Apr 2008
Posts: 14
Location: Chennai

PostPosted: Fri May 08, 2009 12:56 pm
Reply with quote

Hi All,

If the table is empty,

Open/Close cursor doesnt predict the data in the table. Just it open or close the cursor.

Fetch cursor only checks the data in the table.

Thus i resolved my problem.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
No new posts DFHCSDUP EXTRACT unable to open outpu... CICS 5
No new posts IGZ0035S THERE WAS AN UNSUCCESSFUL OP... COBOL Programming 3
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
Search our Forums:

Back to Top