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

Regarding SCROLLING LOGIC IN CICS


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

Active User


Joined: 29 Jun 2005
Posts: 155

PostPosted: Tue Feb 01, 2011 3:41 pm
Reply with quote

Hi Folks,

I am facing an issue in implementing the scrolling logic .
Iam using KSDS file with START BR options(GTEQ) and READ PREV(PF7) and READ NEXT(PF8) . Screen is designed to show 8 records at a time .
Whenever the user presses the PF8 and PF7 the scrolling logic will be performed. But i had a requirement that if user place the cursor at the 4th record and press PF8 then the screen will start from 4th record to 12th record and vice versa . I dont know how to map the cursor postion and check and transform the control to startbr with key field.

Can any one please help on this.

Thanks
Balaji k
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Feb 01, 2011 5:09 pm
Reply with quote

I recommend you go to the CICS Application Programming Reference manual and research EIBCPOSN.

You need to think up a way to keep track of each key on the screen, not just the first and last, so if EIBCPOSN indicates the cursor is on a lne of the screen you can use the key on that line to browse the file and regenerate the screen of data.

Since each site tends to have its own way of doing things like this, your best bet would be to talk to your site support group, team leader, or a coworker about how your site does CICS paging.
Back to top
View user's profile Send private message
balaji81_k

Active User


Joined: 29 Jun 2005
Posts: 155

PostPosted: Tue Feb 01, 2011 5:56 pm
Reply with quote

Hi Robert,

Thanks for the info will try and get back to you.

Thanks
Balaji K
Back to top
View user's profile Send private message
david jackson

New User


Joined: 24 Jan 2011
Posts: 22
Location: California

PostPosted: Wed Feb 02, 2011 5:49 am
Reply with quote

As Robert suggests.
Use EIBCPOSN after the Receive Map and convert it into a ROW number.
You may or may not need to use DEFSCRNWD.
Then use the Row number to pick up the key of the record at that row from which you are to resume and use EIBAID to determine whether you are going backwards or forwards.

Also if the user did not position the cursor - you would presumably want to scroll a full page of 8 records.

Don't just hold the keys from a bunch of records though as other users may be inserting/deleting records whilst you are scrolling so you need to to cater for that.

You also need to cater for being at the beginning or end of the file if the user were to try a scroll. e.g. if you are on the first screen and the user positioned the cursor on row 6 and pressed PF7 to go backwards.
If the file you are reading is volatile, you may need to go back and reread the records again in case anything was changed by another user.
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 Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top