hai

About CICS and BMS - In this Mainframe Forum - You can post your queries on CICS

Moderators: DikDude, Natarajan, Moderator Group

Post Reply
mharipc@gmail.com
Member
Posts: 2
Joined: Tue Nov 09, 2010 4:11 pm
Location: hyderabad

hai

Post by mharipc@gmail.com » Tue Nov 09, 2010 4:53 pm

could u plz.........explain page up page down logic in CICS
HARI

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

PAGE UP and PAGE DOWN logic in CICS

Post by Natarajan » Wed Nov 10, 2010 4:37 pm

Request : Please change the subject from hai to PAGE UP PAGE DOWN logic in CICS.


Anser to your question :
I am assuming your are asking about following requirement.
- User should be able to scroll the screen using PF7 PF8 keys on
CICS screen. ( PAGE UP , PAGE DOWN )

For this first you need to define BMS map which show
multiple rows - Example 5 records to user.


Write cobol program to fetch records from DB2 database or a VSAM file.
scrolling comming into picture, if you fetched more record than defined
fileds in the CICS screen ( in our example 5 records on screen )

Let us assume, you program fetched 50 records.
Then write those records to TSQ.

Send map to user with first 5 records. Have hidden field in BMS
which contains value 5 in it initially. ( OR use COMMAREA to send the value 5 in that)

If user press PF8 ( forward scrolling ). control comes to your CICS program
then take the hidden variable value ( now it is 5) fetch 6 record to 10th record
from TSQ and send the MAP again to user with hidden field value 10. ( 10 can be send thru RETURN COMMAREA )

If user again press PF8 ( forward scrolling ). control comes to your CICS program
then take the hidden variable value ( now it is 10) fetch 11 record to 15th record
from TSQ and send the MAP again to user with hidden field value 15.

Now user pressed PF7 ( backward scrolling ) control comes to your CICS program
then take the hidden variable/field value ( now it is 15 ) .. since your want previous screen, fetch records from 6 to 10th records ( hidden field value - 10) from TSQ and send the MAP to user.

You can write this logic in one para and call that para whenever user
pressed PF7 and PF8 keys.

Instead of hidden field you can use CICS COMMAREA to store hidden value.


Do let me know, if you have any questions on implementing this logic....
Natarajan
Chennai

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others