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
 

 

Cursor Issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Cursor Issue
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: 6967
Location: porcelain throne

PostPosted: Tue Mar 27, 2012 9:50 pm    Post subject:
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    Post subject:
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    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 Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
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 Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


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