View previous topic :: View next topic
|
Author |
Message |
guru.p
New User
Joined: 03 May 2005 Posts: 11 Location: Bangalore
|
|
|
|
I have a requirement I read a DB2 table and fetch records with cursor , records can be 100 or 1000 etc. I have to send this to CICS map, map can only display 10 records at a time. How can I handle this.
Guru.p |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Well, you'll have to write your own scrolling logic, involving the DB2 records and the fields on the map, remembering the last key, etc.
I doubt if someone can supply you with a full tested code (I have few examples, but they are not my property).
For information about cursors, you can start here.
By the way - that's the reason I love NATURAL. It handles all scrolling logic for you, you don't have to do anything...
O. |
|
Back to top |
|
|
sailendranath
New User
Joined: 28 Feb 2006 Posts: 7 Location: bangalore
|
|
|
|
guru.p wrote: |
I have a requirement I read a DB2 table and fetch records with cursor , records can be 100 or 1000 etc. I have to send this to CICS map, map can only display 10 records at a time. How can I handle this.
Guru.p |
Hi GURU,
You can use occurs clause while defining maps and wirte a logic in the applicaiton program, orelse you can use paging concept to overcome your problem |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy,
if you can only show 10 rows,
use the OPTIMIZE FOR 10 ROWS clause
in your query, you can also code FOR FETCH ONLY.
this will improve your query...
martin9 |
|
Back to top |
|
|
|