Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Cursors in SQLRPGLE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cursors in SQLRPGLE

    I am using cursor in one of my SQLRPGLE program; after I 'OPEN'ed the cursor, 'FETCH' the record and now if I don't specify the 'CLOSE' cursor command then what will be the result, will everything go fine at the end of the program (when *inlr is set to '1') or would it result in error?

  • #2
    It depends what else is being done. If the file is being updated your commitment control must be in full order, or otherwise your updates will not take effect. Records may remain locked, and subsequent reads may not be positioned properly.

    Rather than take any chances, just include the CLOSE after your loop concludes.

    Dave

    Comment

    Working...
    X