CICS FAQ's part9

PAGING CURSORS WITH VSAM AS SOURCE USING TSQ

The starting and the ending keys are stored in the TSQ for each and every page.

When ‘PF8’ is pressed then,

Move the end key stored in the TSQ to the RIDFLD of the STARTBR command and then issue READNEXT n+1  ( Here n depends on the page limit or the no of records that can be displayed on a page at a time) times to display the records which will be contained in the next page. We do a READNEXT (n+1) times as we require n records after the current record whose key has been passed in the RIDFLD.

When ‘PF7’ is pressed then,

Move the start key stored in the TSQ to the RIDFLD of the STARTBR command and then issue READPREV n+1  ( Here n depends on the page limit or the no of records that can be displayed on a page at a time) times to display the records which will be contained in the previous page. We do a  READPREV  (n+1) times as we require n records after the current record whose key has been passed in the RIDFLD.

Here the entire contents reside in the VSAM.

Here the records are read by the item number

When ‘PF7’ is pressed then,

Then in order to get the item no of the first record in the previous page. Subtract n (Here n depends on the page limit or the no of records that can be displayed on a page at a time) from the current item number and store then read for n times.

When ‘PF8’ is pressed then,

Then increment the item number by 1 and read n times in order to get the records of the subsequent page.

0 comments:

Computers TopOfBlogs Technology Blogs Mainframe interview question and answers,mainframe jobs,cobol,vsam,jcl,cics,db2,rdbms,mvs,tso,ispf,ibm,hcl,tcs,cts,wibro Blog Directory