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

Cursor Issue


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

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Tue Mar 27, 2012 9:37 pm
Reply with quote

The issue is in regard to a CURSOR WITH HOLD declared in a Batch Cobol-DB2 program

For the defined CURSOR WITH HOLD, at the time of Program execution there are 3 rows. But this CURSOR fetches the row for 4 Times; the 1st row is fetched twice.

I have thoroughly checked the Program Logic in Expeditor, nothing is wrong with the Program flow. I am not sure why the First row is being fetched Twice.
Also After opening the Cursor & before 1st fetch I defined a Count(*) using the where Clause of the CURSOR WITH HOLD, the count is 3.

I decided to go ahead with INSENSITIVE SCROLL CURSOR WITH HOLD. The issue of 1st row being fetched twice is eliminated.

I went throught the documentation of the INSENSITIVE SCROLL CURSOR, but still I am not able to understand how the issue of multiple fetch for the same row was eliminated by the use of this.

Please guide me in getting more clarity on this issue.

Please let me know if I missed out on any important information for looking into the issue
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 27, 2012 9:50 pm
Reply with quote

you figure showing us the select, from and where clauses of your cursor declaration,
and what populated the host variables used in the where clause
are of no use to us?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Mar 29, 2012 1:05 pm
Reply with quote

I think it is more likely that there is a problem with your PERFORM UNTIL COBOL coding.
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 SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Facing ABM3 issue! CICS 3
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top