Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Read a DB2 table and fetch records with cursor

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Read a DB2 table and fetch records with cursor
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: 2360
Location: Israel

PostPosted: Tue Feb 28, 2006 1:49 pm    Post subject:
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    Post subject: Re: CICS
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us