Page up and Page down logic in Cobol-CICS Page up and Page down logic in Cobol-CICS ding1000ma (Programmer) (OP) 9 Apr 02 11:46 Hi,How should I take of page up and page down logic when coding cobol-cics program.thanks,ding RE: Page up and Page down logic in Cobol-CICS gregsimpson (Programmer) 1 May 02 10:49 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.