If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 Cursor Processing Mainframe

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-16-07, 17:56
texasgulfcoast texasgulfcoast is offline
Registered User
 
Join Date: Jan 2007
Posts: 1
DB2 Cursor Processing Mainframe

I am new to DB2. I am writing a called program that will receive a field from another program and look it up in a DB2 table and send back a return code along with data in Linkage Storage. The calling program can call my program one time or 3 million times in a row. I will open the DB2 table only once on the 1st call.
On the subsequent calls I will do a Declare Cursor, Open Cursor and a Fetch Cursor. Will this take care of reading randomly? Do I still need to do a read also or does the Fetch Cursor get my next record? Do I need to close the Cursor after each call to re-position the cursor before the next call to my program?
Thanks in advance for any help.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On