Answer Posted / vaneeshh khurana
See there is no direct method to do so, but still if we want
last 5 rows only we can create a logic which is as follows.
1. Declare an array to save the fetch rows with occurs of 5.
2. Now fetch the rows and start saving in that array such
that when the count becomes 5 overwrite the 6th fetch in the
first occurs similarly the 7th fetch on the 2nd occur.
3. Now when all the fetching is done the array will contains
the last 5 fetched rows.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
How can we read records for specific member in CL? AND rpg?
What do you mean by commit and rollback?
What is the difference between spufi and qmf?
What is sqlca’s maximum length?
What is the role of the data page in the db2 database?
How to find the maximum value in a column in the db2 database?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
How do I add a column to an existing table in db2?
Are view updateable?
Explain the benefits you can get from mainframe connect?
What is the reason behind not using select * in embedded sql programs?
What are the various data types available in db2?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
What is table space in db2?
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?