Rowset Positioning in DB2 PDF
Rowset Positioning in DB2 PDF
http://mainframes-simplified.blogspot.com/2011/07/multiple-row-fetch-using-cursors-in-db2.html 1/4
9/25/2018 Multiple row fetch using cursors in DB2 | Mainframes Simplified
Felton
E10002 Greg
Hamilton
E10003 Denise
Hall
.... ....
.... ....
.... ....
E10100 Jack
Nicolson
[] You will have to add the following to
your COBOL program
Procedure Division
*Open the cursor
OPEN EMP-DATA CURSOR
DISPLAY EMP-NO(SUB-I)
DISPLAY EMP-NAME(SUB-I)
END-PERFORM
What if...
If there are only 96 rows instead of
100 then SQLERRD(3) can be used to
access only the 96 elements in the
array and the remaining 4 elements
can be skipped.Remember that
SQLERRD(3) contains the number of
rows retrieved.
Sumit says...
[http://2.bp.blogspot.com/-
c5cJ335IWz8/TjKLTtaSZUI/AAAAAAAABx8/rtUd6
_mDGOE/s1600/sumit.bmp]
http://mainframes-simplified.blogspot.com/2011/07/multiple-row-fetch-using-cursors-in-db2.html 3/4
9/25/2018 Multiple row fetch using cursors in DB2 | Mainframes Simplified
0 Add a comment
Comment as:
RanmaHalf (Google)
Sign out
Publish Notify me
Preview
http://mainframes-simplified.blogspot.com/2011/07/multiple-row-fetch-using-cursors-in-db2.html 4/4