Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 287
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 Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us