×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Mark,

Would you be willing to share an example of your embedded
SQL....particularly if it used page-wise loading and scrolling?

I've been using multiple logicals and page-at-a-time scrolling for some
time. It works well and can handle files with a gazillion records since
the subfile only "sees" one page loaded at a time. There is even an array
to "hold" selection values until <ENTER> is pressed. The user can select
up to 200 records (arbitrary) for processing at one time

But, I would love to see this done through embedded sql. I've got the
forward scrolling to work, but the scrolling backwards never did work.


Thanks,

Paul Thieme



message: 5
date: Wed, 22 Oct 2008 10:54:40 -0400
from: Mark Walter <mwalter@xxxxxxxxxxxxxxx>
subject: RE: Sorting arrays

I've done it with a prepared statement using embedded SQL.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Shannon ODonnell
Sent: Wednesday, October 22, 2008 10:49 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Sorting arrays

The absolute easiest way I can think of to do this is to have multiple
logical files. Click a heading, rebuild the subfile using the logical that
is already sorted in that order. Click it again, read a different logical
sorted in the other order.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Booth Martin
Sent: Wednesday, October 22, 2008 9:35 AM
To: RPG programming on the AS400 / iSeries
Subject: Sorting arrays

I'd enjoy following a discussion about sorting related arrays. I have
already solved the problem I am about to present, but as I look at my
solution it occurs to me that I am embarrassed to show my solution to
knowledgeable people. There _has_ to be a better way.

Here's the sceanrio: To display a multi-column load-all subfile and
have each column heading clickable. The click would determine which
column is sorted. A second click on a clicked column would sort the column
in the other direction.

There are images of this at

http://www.martinvt.com/Code_Samples/SFL_Sort/sfl_sort.html

The code is also there. It works. But gads, its awful code.

So, lets define the problem a bit more? A load-all subfile with 5
columns of data How would one define the needed array(s), data
structure(s), or whatever(s) so that they can be sorted up or down by a
selected column?






--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------

--
This is the RPG programming on the AS400 / iSeries (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 AS400 / iSeries (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.


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.2/1739 - Release Date: 10/22/2008
7:23 AM




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.