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

how to send 10 rows at a time to output


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

New User


Joined: 11 Aug 2022
Posts: 1
Location: india

PostPosted: Thu Aug 11, 2022 10:03 pm
Reply with quote

The db2 table consists of multiple matching records. I want to display 10 records on a page for a frontend screen at a time. If user goes for next page, then next 10 records from a table needs to be displayed. I want to perform this in a loop using cursor.
Please advise how should i define a logic in cursor and loop.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8637
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 11, 2022 10:31 pm
Reply with quote

This is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. Once you've worked out the logic you need, if you have problems then you can post what the issue(s) are. But until then, we're not writing your code (or logic).
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2915
Location: NYC,USA

PostPosted: Fri Aug 12, 2022 6:24 am
Reply with quote

Welcome!
Since your first post I would volunteer to provide one of the approach below but going forward please try and post errors or issues to get help.

Optimized way-
Fetch and write to a TSQ until end of cursor
Next perform a loop 10 times or end of TSQ
Read TSQ and build mapout symbolic fields.
Send map at the end of the loop.
Using item# of first and last record out of 10 ,you can control your paging logic on TSQ.

Try to write a code on this information and if you get any issues then post us back as suggested.
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 Conditional replace values in output ... DFSORT/ICETOOL 3
No new posts How do I get the desired output using... DFSORT/ICETOOL 2
No new posts COBOL - create and write to output fi... COBOL Programming 0
No new posts Inserting variable length into output... JCL & VSAM 2
No new posts Writing the output file name from a p... JCL & VSAM 7
Search our Forums:

Back to Top