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



Hello, there are a limited ways of loading a subfile page "backward".

From your initial post, I assume that you are not using a descending
index. So there are basically 2 methods left (I know that several
variant may exist).
- you load the subfile backward (from 10 to 1) using a SETGT and a loop
of READP (or READPE)
- You somehow find the value that go on the first row (by doing 10
READE or memorizing the key somewhere or ...) then you load the page as
if you were doing a page down.

From what you describe, I suspect one of those 2 mistake took place
when the program was copied from it's tremplate:

- The looping logic was setupt to go from 1 to 10 instead of the
opposite (most likely)
or
- The looping logic is good (from 10 to 1) but you are doing a SETLL
followed by READ instead of SETGT followed by READE

I hope this may help you

Denis Robitaille
Directeur services technique TI
819 363 6130

SUPPORT
Jour (EST) Daytime : 819-363-6134
En-dehors des heures (EST) After hour : 819-363-6158
Network Status : 819-363-6157

<Blake.Moorcroft@xxxxxxxxxx> 2009-03-30 14:14 >>>
Hello Michael...

That might solve the problem, but it doesn't explain why on 39 programs

the procedure works fine and on the 40th it doesn't.

Have a good day.


Blake Moorcroft
Developer - Corporate
Russell A. Farrow Limited
1980 Ambassador Drive, PO Box 333, Windsor, Ontario N9C 3R4
Bus: 519-966-3003 ext. 566, Fax: 519-966-9870
blake.moorcroft@xxxxxxxxxx




Michael_Schutte@xxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/30/2009 01:52 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Subfile reversing display






Simple answer...

You are reading previous and adding to the subfile display as you read
backwards.

Solution...
When reading previous add to an array and put the first record read in
element 10. Then when finished output the array to the subfile.

Or
Read previous only to set the position of the file. Then use your
forward
read loop to read the file again to populate the subfile.




Michael Schutte
Admin Professional



We've wrapped up a whole new breakfast adventure in Bob Evans
BOBurrito.
Premiering at 5.99. For more information and to enter the FREE
Breakfast
Every Week for a Year Sweepstakes ($500 value), visit www.BOBurrito.com



rpg400-l-bounces@xxxxxxxxxxxx wrote on 03/30/2009 01:41:55 PM:

Hello all...

I'm running into a really weird situation and I'm wondering if
anyone's
ever encountered it before.

We're generating a subfile with 10 records (one page at a time,
subfile
size and page = 10), nothing fancy, with both regular and hidden
fields.
There are no issues with writing the records themselves.

When paging down (using the roll-up), the records proceed forward 10
at
a

time in ascending sequence.

If, however, the page up key (roll down) is used, the records appear
in
a

reversed order - the correct records appear, just out of sequence.
I've
included an example of what's happening:


Screen - starting position:

A Record
B Record
C Record
D Record


Screen after paging down:

E Record
F Record
G Record
H Record


Screen after paging up

D Record
C Record
B Record
A Record.

If we were now to hit the page down key again, we would get

E Record
F Record
G Record
H Record


The procedure is pulling the correct records, it's just not
displaying
them in the proper way.


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 checked the clear and display of the subfile and there are no
indicator issues.

I've stepped through the code with the debug procedure and watched
how
it

is writing the records, verifying the contents of each record's
fields
and
the relative record number associated to the record being written -
there

are no issues and the relative record number is being properly
assigned.

Any ideas?

Have a good day


Blake Moorcroft
Developer - Corporate
Russell A. Farrow Limited
1980 Ambassador Drive, PO Box 333, Windsor, Ontario N9C 3R4
Bus: 519-966-3003 ext. 566, Fax: 519-966-9870
blake.moorcroft@xxxxxxxxxx
--
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.
--
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 ...

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.