Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
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
References
PostPosted: Sun Feb 05, 2006 8:34 pm    Post subject: Re: Regarding cursor in db2. Reply with quote

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: 1481

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

Active 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

Active User


Joined: 21 Sep 2005
Posts: 81
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: 152
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1