View previous topic :: View next topic
|
Author |
Message |
lakshmibala
New User
Joined: 16 Jun 2004 Posts: 47
|
|
|
|
hi,
thanks so such for ur reply.
but what i want is actually the page up and page down logics.
in mainframes we use keys f7 & f8 for paging up and down.
we want the codings for this logic.
please do reply for my question
bye,
lakshmi
|
|
Back to top |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
You can define your own PF Key for page up and down |
|
Back to top |
|
|
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
i will tell u the logic....
conside the file has 20 records...
Code: |
E001 ........
E002 ..............
E003 .........
.....
...
E020
|
in a screen if u displaying 5 records at a time...so for the first time first 5 records will be displayed. so use a select statment without any condition using a cursor. move the first 5 record onto the map field which having occurs clause.
so now the display is
Code: |
E001 ........
E002 ..............
E003 .........
.....
E005 ...
|
set upper-limit = E001, lower-limit = E005
if user opts for page down.. then use a select statement like
Code: |
select * from demo_table where ecode > lower-limit;
|
then display the next five records.
Code: |
E006 ........
E007 ........
E008 .........
.....
E010 ...
|
set upper-limit = E006, lower-limit = E010
if the user opts for page up then use this query
Code: |
select * from demo_table where ecode < upper-limit;
|
so again display the first five records.
so u always need to store two limits.
upper-limit is used for page up.
lower-limit is used for page down. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Lakshmi,
If you work in DP as a pgmr you can look at source code for CICS pgms. Most CICS systems have a browse function.
The most common CICS application system functions are:
Add
Delete
Change
Browse
They're all over the place. Just list the members in your company's CICS loadlib, then use that list to peruse the source library.
You'll probably see a common approach to the problem that you should adopt for your pgm.
Regards, Jack. |
|
Back to top |
|
|
|