Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page up and Page down logic in Cobol-CICS

Status
Not open for further replies.

ding1000ma

Programmer
Sep 2, 2001
10
0
0
US
Hi,
How should I take of page up and page down logic when coding cobol-cics program.
thanks,
ding
 
The use of the TSQ as above is quite a tried and tested method. However there are other options, which may or may not be more efficient depending on the nature of your transactions.

Also be wary of TSQ's in the future as many shops are moving to TORs and AORs. Depending on the specific implementation there may be no gaurantee any longer that you will be able to pick up a TSQ, so created in such a shop, on subsequent transactions.

It is possible just to read the first 8 records, store the key in the COMMAREA, CICS MAP, wherever. Then use the key to start reading from the next set of data. This has the advantage that you are only reading the records your user requests rather than all records. However it is possible to combine read ahead logic and tsq processing together to ensure you only read from a file once per record. It's down to how you design it basically, are the users going to scroll backwards very often or not?

If your using later versions of DB2 you may want to include scrollable cursors to help with positioning. Regardless of which version your using it is possible to write SQL in such a manner that it is effectively positionable within a table, so you can always "start from where you left off", as long as you store and return a key to your application. I can give you some SQL examples of this if you wish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top