IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Read a DB2 table and fetch records with cursor


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guru.p

New User


Joined: 03 May 2005
Posts: 11
Location: Bangalore

PostPosted: Tue Feb 28, 2006 12:47 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Feb 28, 2006 1:49 pm
Reply with quote

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... icon_lol.gif

O.
Back to top
View user's profile Send private message
sailendranath

New User


Joined: 28 Feb 2006
Posts: 7
Location: bangalore

PostPosted: Tue Feb 28, 2006 2:17 pm
Reply with quote

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
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Thu Mar 02, 2006 2:30 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top