On the roll forward key, my program issues READ commands to process
the file, and the subfile loads up and displays all nice and pretty.
On the roll backward key, my program issues the READP command, but the
subfile is still loading from top to bottom, so the records are being
displayed in descending order on the screen.
My question is, is there any keyword for the subfile, or something
else I can do, to tell the subfile to load backwards, or from the
bottom to the top, when the roll backward key is pressed? I searched
around, but can not find anything that will allow me to do that.
Thanks in advance for any help.
Jeff
----------
In article <384fc9e6....@news.theriver.com>,
Standard technique: use READP in a loop, SFLPAG times, then build the
page as normal.
____
Paul
On Thu, 09 Dec 1999 10:45:35 -0600, "Thom Goodin"
<thos...@gal.intranet> wrote:
>It is possible to set the record number associated with the subfile (see
>KSFILE continuation spec) to the maximum for the screen and then decrement,
>rather than increment it, checking in your READP loop for EOF or a record
>number less than 1.
>
>----------
>In article <384fc9e6....@news.theriver.com>,
>jmiller*nospam*@pcsdps.org (J. Miller) wrote:
>
>
>> I am new to subfiles, and am putting together an employee browse
>> screen. I want the user to be able to use the roll forward and
>> backward keys to browse though the file.
>>
>> On the roll forward key, my program issues READ commands to process
>> the file, and the subfile loads up and displays all nice and pretty.
>>
On Thu, 09 Dec 1999 16:45:18 +0000, Paul Cunnane <pa...@orac.ie> wrote:
>> On the roll forward key, my program issues READ commands to process
>> the file, and the subfile loads up and displays all nice and pretty.
>
----------
In article <384fe2d8....@news.theriver.com>,
jmiller*nospam*@pcsdps.org (J. Miller) wrote:
> I already tried that, but what is happening is only the last record in
> the subfile is displayed. It appears that the program thinks the
> subfile is full because the counter was on the last record.
>
>
>
> On Thu, 09 Dec 1999 10:45:35 -0600, "Thom Goodin"
> <thos...@gal.intranet> wrote:
>
>>It is possible to set the record number associated with the subfile (see
>>KSFILE continuation spec) to the maximum for the screen and then decrement,
>>rather than increment it, checking in your READP loop for EOF or a record
>>number less than 1.
>>
>>----------
>>In article <384fc9e6....@news.theriver.com>,
>>jmiller*nospam*@pcsdps.org (J. Miller) wrote:
>>
>>
>>> I am new to subfiles, and am putting together an employee browse
>>> screen. I want the user to be able to use the roll forward and
>>> backward keys to browse though the file.
>>>
>>> On the roll forward key, my program issues READ commands to process
>>> the file, and the subfile loads up and displays all nice and pretty.
>>>
There are other techniques using data file positioning you can also
employ.
J. Miller wrote in message <384fc9e6....@news.theriver.com>...
I implimented the DO loop with READP like Paul suggested. It works
fine, and if that is pretty standard it's good enough for me. I just
thought there might be a simpler way with a keyword or parameter to
control it.
On Thu, 09 Dec 1999 12:48:35 -0600, "Thom Goodin"
<thos...@gal.intranet> wrote:
>Actually, the technique Paul advises is pretty standard. When you say only
>the last line is displayed, do you mean the last line output, or the last
>line on screen (i.e. at the bottom of the screen)?
>
>----------
>In article <384fe2d8....@news.theriver.com>,
>jmiller*nospam*@pcsdps.org (J. Miller) wrote:
>
>
>> I already tried that, but what is happening is only the last record in
>> the subfile is displayed. It appears that the program thinks the
>> subfile is full because the counter was on the last record.
>>
>>
>>
>> On Thu, 09 Dec 1999 10:45:35 -0600, "Thom Goodin"
>> <thos...@gal.intranet> wrote:
>>
>>>It is possible to set the record number associated with the subfile (see
>>>KSFILE continuation spec) to the maximum for the screen and then decrement,
>>>rather than increment it, checking in your READP loop for EOF or a record
>>>number less than 1.
>>>
>>>----------
>>>In article <384fc9e6....@news.theriver.com>,
>>>jmiller*nospam*@pcsdps.org (J. Miller) wrote:
>>>
>>>
What the original poster was probably looking for was way to use the pageup
key to display the records that occurred before the starting value the user
keyed in.
Since the records were written from record 1 it is not possible to write the
subfile records before that point. The only method that I have found that
works reasonably well is to read backwards SFLPAG records and then use that
record as the new starting point to rebuild the subfile.
But this method has one serious drawback. In the normal forward paging input
fields typed in on the subfile records are retained, however if the user
pages back beyond the beginning of the subfile those values are lost unless
the program goes through gyrations to keep them
"LJ Samuelson" <no...@none.com> wrote in message
news:u5RRnDrQ$GA.210@cpmsnbbsa05...
> Possibly I'm missing something here, but...
>
> You can create a subfile so that scrolling backwards (page up/rolldown) is
> controlled by the system. This is an expanding subfile and avoids IO to
> your database.
>
> Set SFLPAG one less than SFLSIZE. Load a subfile page. When the page
down
> key is hit, read new records and load another subfile page.
>
> When the page up key is hit, you never get control--the system display the
> previous page and continues to do so until it hits the beginning of the
> subfile, when it locks the screen with a message. Page down then displays
> the next page in the subfile and gives control back to your program only
if
> it hits the end of the subfile, and you can then load another page.
>
> Sam
>
> "J. Miller" <jmiller*nospam*@pcsdps.org> wrote in message
> news:385008fb....@news.theriver.com...
as you can see in the other postings there are some limitations :
you cannot roll backward before the first subfile record without refilling
the subfile.
you cannot positioning to a special subfile record , you can only
positioning to the page with the record
you cannot fill more than 9999 records in the subfile.
you cannot clear a record number without refilling the subfile.
if you cannot live with these limitations you can use the UIM manager.
The UIM manager don't have these limitations.
All AS/400 system panels and also list panels are written with the UIM
manager
a good example is WRKMSGD MSGID(CPF0000). After the panel is shown, you can
roll backward.
I know PDM is written with the subfile technique but that is no system
panel.
Peter
"J. Miller" <jmiller*nospam*@pcsdps.org> wrote in message
news:384fc9e6....@news.theriver.com...