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

Regarding cursor in db2.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
No new posts Multiple rows within Cursor when Coun... DB2 14
No new posts Dynamic cursor name in Cobol program COBOL Programming 1
Search our Forums:

Back to Top