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



From my notes in the SFL format on page at a time scrolling:

YOU CAN NOT USE INDICATORS ON THE FIELDS OR THE SYSTEM
WILL ALWAYS FILL FROM THE TOP DOWN RATHER THAN BOTTOM UP WHEN
YOU ROLLDOWN AND SET RRN ACCORDINGLY

And I don't use the SFLRNA keyword anywhere.

Also, in my RPGLE *INZSR I have a loop that builds a blank page (don't
remember why I don't use SFLINZ) and I use SFLDLT before each page load.

Sometimes I wrap the SFL in a window so the display file template
contains a never written DUMMY format with the ASSUME keyword. Don't
know if that has side affects or not. It is just part of the template
that I know always works.

This is all from a template I developed using the Way Back Machine on
the Sys38 so some of it may have been obsoleted by later enhancements.
Since I can drop the template in and with a few scan/replace have a
complicated process up then concentrate on the truly unique needs why
mess with success.

With supporting *LFs ready I can do a "Work With" screen that scrolls
both directions, has a "Position to" and even a "Lookup" when "Position
To" is a composite that includes a "Master File" restricted portion in a
matter of minutes.

Roger Vicker, CCP

On 3/30/2009 4:22 PM, Simon Coulter arranged the binary bits such that:
On 31/03/2009, at 4:41 AM, Blake.Moorcroft@xxxxxxxxxx wrote:


This subfile procedure is used in a number of programs. I use it
any time
we need a subfile - basically cloned code. None of the other programs
that use this code are having the same issue - there are around 40
different programs using it. The logical that is used during the
fill of
this particular subfile is not unusual - a three key index with
ascending
controls on the keys - there are no omit or select functions. I have
checked the logical to verify the index properties.


I've read all the various comments on this problem. Let's see if this
is an accurate summary. Correct any wrong presumption:

o You have 40 programs that share the same subfile handling code.

o The subfile are SFLPAG=SFLSIZ

o You have generic code that handles both page-up and page-down

o In 39 programs the output on paging backwards through the file is
correct but in this one it is reversed.

o Debug shows that you read the expected records.

o Your code does the following:
- read 1st record from file and add to record 1 in subfile
- read 2nd record from file and add to record 2 in subfile
- . . .
- read 10th record from file and add to record 10 in subfile
- subfile is now full so you display it
- user presses page down
- clear the subfile
- read 11th record and add to record 1 in subfile
- read 12th record and add to record 2 in subfile
- . . .
- read 20th record and add to record 10 in subfile
- subfile is now full so you display it
- user presses page up
- clear the subfile
- position to record 10 (i.e., current=20 minus size=10)
- read 10th record and add to record 10 in subfile
- read 9th record and add to record 9 in subfile
- . . .
- read 1st record and add to record 1 in subfile
- subfile is now full so you display it

The problem is the instead of 10th record being in record 10 it is in
record 1 and each file record follows it thus the subfile is in
reverse sequence.

If this is an accurate representation of the processing and result
then the problem is likely due to an un-initialised subfile. I expect
that the original code is depending on the use of SFLRNA. This keyword
is either:
o specified in the DDS for the working 39 programs and omitted from
yours
o specified in your DDS but conditioned off
o specified and conditioned on but you've incorrectly mapped display
file indicators to named indicators and are not actually setting it on.

If it appears that SFLRNA is specified and activated correctly then
the likely cause is that your decrementing loop counter is not
correctly mapped to the SFILE variable.


Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------






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.