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



Booth,

I'm looking to do the equivalent of a position-to within a loaded subfile. This is a load-all subfile.

Example:
Subfile page size = 10

Number of records loaded = 32

Page 2 is displayed and the cursor is on the 4th record of the page, which is the 14th record loaded.
If the user presses a function key I would like the 4th record on the page (aka the 14the subfile record) to be the beginning record on that page. Page up would then display the previous 10 records,
starting at RRN 4. Page up again would reposition the first line starting at RRN1.

I would also like full control using SFLRCDNBR to able to position the cursor and page for other functions.

Is this easy to accomplish via SFL keywords? Or do I need to reload the subfile and add additional paging logic?


-mark

At 2/11/2011 05:24 PM, you wrote:
Instead of conditioning it, just set the TOPREC field name to 1 unless
you have a reason to set it to a higher value. For instance you can do
(TOPREC = number-of-records - page-size) to show a full last panel on
start up.


On 2/11/2011 3:41 PM, Joe Pluta wrote:
> Nope, you can't condition it. At least I couldn't do it; the system
> complained.
>
> Joe
>> Booth, Joe,
>>
>> Thanks - I had forgotten about the *TOP keyword. I'll try it out
>> next week. I'm assuming that it can be conditioned, so that I have
>> the option to either have *TOP or the RRN specified.
>>
>> The scrollbar is an interesting option (which I have used in the
>> past.) I would like to implement it for this program, but I don't
>> think that all emulators support them. Plus, the size of the data on
>> the screen is too large to accommodate it.
>>
>> -mark
>>
>> At 2/11/2011 03:33 PM, you wrote:
>>> Add a scroll bar. Its just a click&drag on the bar. The programming is
>>> one word. You need three blank columns on the right hand side (The
>>> subfile can't use the whole screen)
>>>
>>> Or use SFLRCDNBR(*TOP)
>>>
>>> A 91 SFLEND(*SCRBAR *MORE)
>>> A TOPREC 4S 0H SFLRCDNBR(*TOP)
>>>
>>>
>>> (note: The scroll bar also allows the user to move the subfile up and
>>> down one line at a time, which is a pain to do with programming.)
>>>
>>>
>>> On 2/11/2011 1:29 PM, M. Lazarus wrote:
>>>> I have a load-all subfile (not very many maximum records.) What I
>>>> would like to do is have a "Move to top" function, similar to UIM
>>>> help "F10=Move to top", which moves the help text from cursor
>>> line to the top.
>>>> Is there a way, without reloading the subfile from that point
>>>> onward, to control the first line of the subfile?
>>>>
>>>> -mark
>>>>
>>> --
>>> Booth Martin
>>> 802-461-5349
>>> http://www.martinvt.com
>

--
Booth Martin
802-461-5349
http://www.martinvt.com
--
This is the RPG programming on the IBM i / System i (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 ...

Follow-Ups:
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.