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
 

 

Regarding cursor in db2.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
p_karthikkumar

New User


Joined: 19 Mar 2005
Posts: 3
Location: Chennai

PostPosted: Sun Feb 05, 2006 8:34 pm    Post subject: Regarding cursor in db2.
Reply with quote

Rows in the table are selected if i am using select statement in qmf, But in embedded sql i am using cursor with same select statement, the sqlcode of +100 will occure.Remember i am passing same condition to the host variable. [/b]
Back to top
View user's profile Send private message

p_karthikkumar

New User


Joined: 19 Mar 2005
Posts: 3
Location: Chennai

PostPosted: Sun Feb 05, 2006 8:40 pm    Post subject: Regarding cursor in db2.
Reply with quote

Rows in the table are selected if am using select statement in qmf, but i embedded sql i am using curssor with same select statement, the sqlcode of +100 will occure.Remember i am using same condition in host variable.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Feb 06, 2006 1:23 am    Post subject:
Reply with quote

Details?
Back to top
View user's profile Send private message
pa1chandak
Currently Banned

New User


Joined: 31 Jan 2006
Posts: 55

PostPosted: Mon Feb 06, 2006 9:25 am    Post subject:
Reply with quote

+100 is not a error
it is end of table reached



pawan
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Mon Feb 06, 2006 4:13 pm    Post subject:
Reply with quote

Does your program INSERTS or DELETES record before or after your cursor is OPENNED? If that is the case may be at run time you have no records in the table that you want to fetch using cursor.

If this is nor the case, it's not possible that you will get different results in QMF and runtime using same query.


Regards,
Umesh
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Mon Feb 06, 2006 4:24 pm    Post subject:
Reply with quote

Hi ,
SQL code 100 specifies end of table means searching is over depending on ur condition and it reached the table end but no record satisfies ur condition. I think its not possible to get different results in qmf and prg.Check ur cursor declaration. Better give some more details about ur problem.
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 Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts DB2 Stored Procedure - Dynamic SQL - ... GuyC DB2 2 Wed Feb 17, 2016 5:10 pm


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