× 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.



Hi,

>>In the other hand, if I use a subfile with SFLSIZ = SFLPAG, how can I trap
>>multiple selection in the subfile. I mean, what if the user selects a
record
>>in one page, press the PageDown key, and selects another record in that
>>page? If I clear the subfile each time the user press the PageUp or
PageDown
>>key, the READC won't see the selected records from the previous pages,
only
>>the ones in the current page, isn't it?

We solve this with a keyed dataqueue in the QTEMP. As key we use the key
fields of the file (to accomplish the sort sequence) and the relative record
no. As data we store the option a user inserted. If we read a record to fill
the subfile, we try to receive a data queue entry for this record. If no
entry is found, the option is set to *Blanks, if an entry is found the
appropriate option is returned. At page up or page down or positioning at
the begin (F17) or end (F18) of the file or any other positioning, we first
do a readc and store the options in the data queue and after we fill the
subfile page. If enter is pressed, we receive all data queue entries
beginning with the smallest key and process the appropriate task. If F12 is
pressed, we fill the subfile page again, beginning with the record where the
option was cancelled. All other options stay stored in the data queue.

In this way a user even can position on the first record and after on the
last record in a file with more than 9999 records without any performance
problems.

Mit freundlichen Gruessen / Best regards

Birgitta

"Shoot for the moon, even if you miss, you'll land among the stars."
(Les Brown)

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Charles St-Laurent
Gesendet: Mittwoch, 22. Marz 2006 17:13
An: rpg400-l@xxxxxxxxxxxx
Betreff: self-extending subfile and multiple selection?


Hi!

I read an article about self-extending subfile to navigate through data. The
technique looks quite simple. Each time the user press the PageDown key, or
the alternate key associated to the PageDown action, the program takes the
control and fills the next subfile page. But if the user press the PageUp
key, the system handles it.

There is limitations about this technique. The number of records the subfile
can contain is still limited to 9999. What if my file contains about 300 000
entries and a maniac user tries to scroll down to the end of the file?

In the other hand, if I use a subfile with SFLSIZ = SFLPAG, how can I trap
multiple selection in the subfile. I mean, what if the user selects a record
in one page, press the PageDown key, and selects another record in that
page? If I clear the subfile each time the user press the PageUp or PageDown
key, the READC won't see the selected records from the previous pages, only
the ones in the current page, isn't it?

What's bugging me is the limited size of a self-extending subfile and the
case of a multiple selection between pages. Is there a way to have a
self-extending subfile that can be greater than 9999 records and handles the
selection of multiple records through different pages?

Charles St-Laurent



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.