Can anyone explain the page UP (PF7) and Page Down(PF8) logic in cics application program?

Showing Answers 1 - 5 of 5 Answers

soumya_dev

  • Feb 27th, 2006
 

Hi,

      Use TSQ for scrolling data in CICS...Increase the item number for forward scrolling and Decrease the item number for reverse the same...Make ensure item no..not to exceed the limit...

  Was this answer useful?  Yes

Sukant Kumar Padhi

  • Mar 7th, 2006
 

To achieve the above goal you have to follow the steps as specified by soumya. i.e you have to use a TSQ to store the data. Along with that you can use three variables to keep track of

1: Total no. of records prsent in the TSQ (Tot-Rec ). 

2: Total no. records displayed in the current screen (Rec-Disp).

3: Last record displayed (Last-Rec-Disp).

Example : If you are having 35 records in the TSQ and in a screen you are displaying 12 records.

If you are in the 2nd screen, Tot-Rec = 35, Rec-Disp = 12 & Last-Rec-Disp = 24. If you are in last screen, Tot-Rec = 35, Rec-Disp = 11 & Last-Rec-Disp = 35.

For both F7 and F8 1st set the starting point from where you have to start displaying the records and start displaying 12 records in a loop. If no records are available in the TSQ to display, then display spaces.

  Was this answer useful?  Yes

Surya

  • Aug 8th, 2007
 

Let us take an example:

Total no.of Items = 50 (MAX-ITEM)
Total no.of items per page = 8 (PG-ITEM)

So, initially display should start with item number one. Whenever you come to the scroll screen display the first 8 items and display page down key alone.User should have an page down option alone.

Also declare another variable which will holds the current displaying item number(CURR-ITEM).

Now the logic for page down is,
IF (CURR-ITEM <= MAX-ITEM AND CNT <= PG-ITEM) THEN
CURR-ITEM=CURR-ITEM + 1
END-IF

When its second time displaying the details, Display page down and page up options.

Now the logic for Page up is,
IF (CURR-ITEM <> 1 AND CNT <= PG-ITEM) THEN
CURR-ITEM=CURR-ITEM - 2*PG-ITEM + 1
END-IF

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions