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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm

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