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



I moved on to other things that were problems in the program, and now the subfile is paging correctly. Incidently, I do load all the data I have. I am only using the paging to allow extending the subfile for additional records to be added at the end of the subfile. I am expecting IBM to do the paging except for adding a blank page at the end of the subfile. It is the IBM paging that wasn't working. Not sure what fixed things as I didn't change the display file between the time it wasn't working and the time it started working.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Booth Martin <booth@xxxxxxxxxxxx> wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: Booth Martin <booth@xxxxxxxxxxxx>
Date: 03/11/2015 12:57AM
Subject: Re: Odd subfile paging behavior

Try changing the

A 51 SFLEND(*MORE)
to
A N50 SFLEND(*SCRBAR *MORE)

And move PAGEDOWN(08) to file level, with no indicator. You do not need
indicator 51 for this paging.
_____________________________________________

Would you consider doing a load-all subfile and be done with it? The
days of programming for 300 BAUD modems are long gone. Do away with
PAGEDOWN and all activity related to paging. Let IBM take care of it
for you.

Change SFLSIZ(0015) to SFLSIZ(NBRRCDS) and define NBRRCDS 5S 0P
Then fill the subfile from the data file and add 5 to 10 blank records
at the end for added comments. Lastly NBRRCDS = subfile record number
from the loading loop. If exceeding 9999 subfile records is a concern,
then you will wish to trap for it.

Only process records that have data so you do not add empty records at
the end of every cycle.

Generally I prefer to have a hidden field in the subfile filled with a
datastructure like the subfile editable fields so I can do a read loop
through the subfile looking for records that have been changed,
blanked(deleted), or added.

Here is an example of what I am suggesting.
http://martinvt.com/Subfiles/Data_Editor/data_editor.html

PS: Notice the scroll bar - very handy for users to allow them to
page-at-a-time or a few lines-at-a-time. That is a one word change in
your DSPF and users love it.


On 3/10/2015 11:48 AM, Mark Murphy/STAR BASE Consulting Inc. wrote:
Or, what would cause the Pagedown key to return to your program every time rather than when the system is on the last page?

I have two subfiles defined the exact same way. One works properly, the other does not.

Here is the control format for the one that fails:
A R JQCFMC
A TEXT('Quote comments control format-
A ')
A SFLCTL(JQCFMB)
A SFLSIZ(0015)
A SFLPAG(0014)
A RTNCSRLOC(*RECNAME &CSRRCD &CSRFLD)
A RTNCSRLOC(*WINDOW &CSRROW &CSRPOS)
A CSRLOC(CSRROW CSRPOS)
A OVERLAY
A SFLCSRRRN(&SFLCSR)
A N50 SFLDSP
A N50 SFLDSPCTL
A 50 SFLCLR
A 51 SFLEND(*MORE)
A N51 PAGEDOWN(08)
A SFLCSR 5S 0H
A CSRRCD 10A H
A CSRFLD 10A H
A CSRROW 3S 0H
A CSRPOS 3S 0H
A JQCRN 4S 0H SFLRCDNBR(CURSOR)

I am loading two pages of records to start with, and it initially displays the first page. If I press pagedown, it loads and positions to page 3. Positions to page three because the program positions to the new page on page down. But it shouldn't be dropping back to the program until it pages to page 2 first. In the feedback area, the field showing minimum subfile record on the page (at position 378) correctly indicates record 1 the first time Pagedown is pressed. Correctly because that is the first subfile record on the display. I guess it could be incorrect because in order for the PageDown key to return to the program it should say 15, but it says 1. If I page back up to the top, or anywhere in the subfile for that matter, and press PageDown, it immediately comes back to the program. The feedback field is correct for the first subfile record on the screen. The frustrating thing is this used to work, and I don't remember changing anything that would make it stop working.
Th
e other thing that is strange, is that it works fine if SFLEND is on. Then it pages to the second page before telling me that I have paged beyond the end of the subfile. And SFLROLVAL is not specified anywhere on the subfile.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


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.