× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 3/4/2016 1:14 PM, RWesh@xxxxxxxxxxx wrote:
Good Afternoon

I was hoping someone could explain to me how to properly code for an
instance when the user presses the Page Up or Page Down key while in a
subfile.

I have the following in my DDS

A DSPSIZ(24 80 *DS3)
A PRINT
A CA01(01 'MAIN MENU')
A CA02(02 'NEXT QUERY')
A CA03(03 'PREVIOUS')
A PAGEUP(81 'PAGE UP')
A PAGEDOWN(82 'PAGE DOWN')

This allows me to utilize *IN81 and *IN82 however it seems like my code is
only run when the keys hit the end of the subfile.

That is normal where SFLSIZ <> SFLPAG. IBM i handles paging between
pages that are already loaded, and only returns control to your code if
it reaches the end (or beginning).

For example, I have code that should evaluate a Y/N field in a subfile
record and turn on a protect indicator when one of the Page keys are
pressed.

If you set SLFSIZ = SFLPAG then you will get control on every press of
the Page keys, but now you must keep track of where in the PF you are as
you READE going forward and READPE going back. Or store the keys in an
array that you manage, or, or, or.

Please note I am coding in RPG III.

?!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.