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

multipage message with single map panel


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

New User


Joined: 15 Jul 2006
Posts: 9

PostPosted: Sat Jul 29, 2006 1:45 pm
Reply with quote

if the data to be displayed is from a DB2 table and the number of rows retrieved for the query is around 1000, where as in a single screen a maximum of 10 rows can only be displayed. how should this be implemented? if all the maps are accumulated wont there be a decrease in the cics performance and also say if we are viewing the second page of the result and another person has in the meanwhile modified a data in the table which has been accumulated in our (say) 100th page the change will not be reflected in our display, so how else shud this be implemeted?
OR
if everytime the user wants to scroll to the next page, shud the sql query be executed (soodo convers), by taking into consideration of the last record retrieved from the previous query and making sure the result for this query would values greater than previous results( by making a filed/set of fields as keys), if this is one solution can anybody give a real time example of such a query that incorporates such scrolling. somebody who has worked real time on such things pl reply.
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Mon Jul 31, 2006 10:26 am
Reply with quote

Santy,
The best approach in this scenario would be to go for TSQ's.Put all the data from the result set to TSQ.Then get data stored in TSQ thru CICS comands.You can implement it thru a pseudo conversing prog by passing the first and last record that you accessed thru the commarea (ie,assumunig your screen is designed to populate 10 data at a time)along with the user response keys(ie,PF7 or PF8 Scroll UP/Down).
Programtically this needs be controlled.So in this scenario all it requires is to populate just 10 output data fields at a time to map before senting map to screen.

One thing to note here is at the time when you create TSQ make sure to give a TSQ a unique name ie,use your own id as the first 4 letters followed by any other standar way of naming the TSQ.This would ensure uniqness of TSQ name.This is cos all the transactions running would be able to access the TSQ names just by pointing to its name which would cause not only confusion but some times unwanted results..


-Han.
Back to top
View user's profile Send private message
santy780

New User


Joined: 15 Jul 2006
Posts: 9

PostPosted: Mon Jul 31, 2006 2:02 pm
Reply with quote

fine Han, say the query result is very large( hundred 10 row pages). by executing the query once the entire result would be written to TSQ. now in the meantime someone changes the data in the table (the data that is part of our result) our pages will not reflect the changes. this strategy has this drawback, how do you overcome it?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Jul 31, 2006 10:44 pm
Reply with quote

Your second approach is the way to go. In your cics program you keep an array in the commarea of the first key displayed on the screen and the last key displayed. You create 2 cursors on for forward and 1 for backward
processing of the keys. You are then going to get any data that has changed and you do not need a TSQ as you are only fetching the 10 lines each time to fill the screen.
Back to top
View user's profile Send private message
santy780

New User


Joined: 15 Jul 2006
Posts: 9

PostPosted: Tue Aug 01, 2006 4:00 pm
Reply with quote

Thanks mickey, so this every-time-fetch approach is used real time. hope u have replied having seen such an implemetation real time?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Aug 04, 2006 8:04 pm
Reply with quote

This is still pseudoconversational programming, the user enters a command in cics and your program responds to the requested action weather its the enter key or a function key. you display the screen with the first rows of data selected, when the user uses a function key to page forward or backward your program needs to fetch the next rows to be displayed. this is done by keeping the first line displayed and the last line displayed on the screen in an array in the commarea. For each screen display you place the first and last lines here and this is what you use to do you next fetch with.
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Fri Aug 04, 2006 9:28 pm
Reply with quote

Santy,
You can go with the option of execuiting a query every time based the users response since you dont want to compromise on the read/update/write integrity..During BIND use CS and also if its for read and only limited rows only required can code FETCH 10 ROWS ONLY etc for DB2 to perform the block fetching.

-Han.
Back to top
View user's profile Send private message
santy780

New User


Joined: 15 Jul 2006
Posts: 9

PostPosted: Mon Aug 07, 2006 1:10 pm
Reply with quote

thanks a lot people
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts IMS Message : DFS3577A IMS DB/DC 4
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
Search our Forums:

Back to Top