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



It's actually quite common from the projects I've worked on. I even wrote
about how to use dynamic SQL for all of that in one of my books (I think it
was eRPG v2).

I still use it to this day. Much easier to build a dynamic SQL statement.
Just keep track of everything in hidden fields and populate them when you
build the screen.

It basically goes...

build the start of the SQL (ie, select fields from file)
build the select (ie where x=1.....)
build the order (ie, order by x, y, z desc, ....

Slam them all together and run it.

You can add for read only, optimize for x rows, etc to the statement as
well... even keep track of pages using RRNs. Most web screens I do have a
number of records per screen field as well so optimize for x rows is simple
to do.

Oh, I realized I have a demo for it here:
http://bvsdemo.bvstools.com/service.html

You can inspect the page after loading one of the lists and view the SQL...
it's in a comment in the code. But since it's ajax you need to inspect,
not view source. If you view the source you will see smaller SQL
statements in the comments for other SSI blocks but not the main one used
to fill the div using ajax unless you inspect the page.

Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #18 <https://www.bvstools.com/mailtool.html>: Ability to
use SSL, TLS or OAuth 2.0 authentication. (OAuth 2.0 only available with
Google or Microsoft Office 365).

On Sat, Dec 14, 2019 at 10:58 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

I wouldn't use a green screen. I'd use a browser and let query or whatever
worry about it!

But the qsort could be coded to reverse the sort order fairly easily - or
for that matter just write and extra procedure - they are all pretty much
clones of one another so no big deal.

Frankly I don't find the criteria realistic. Users usually want one thing
or another. As long as they can easily go tot he end of a list I'm not
convinced ascending and descending is useful Just because you _can_ do
something doesn't mean you should!

No matter what technique you use - qsort or Bruce's API reference or SQL
you still have a lot of work to do.


On Dec 14, 2019, at 1:06 AM, Booth Martin <booth@xxxxxxxxxxxx> wrote:

1. State-up, City-up
2. State-up, City-down
3. State-down, City-up
4. State-down, City-down
5. City-up, State-up
6. City-up,State-down
7. City-down, State-up
8. City-down, State-down

State-up, City-up != City-up,State-up

Here is the practice exercise: A two-column subfile; State & City.
Click either heading and sort by that column. Clicking a column heading a
second time reverses the sort. Maintain the current sorting order for the
non-clicked column. This is the same behavior that we see and are used to
in our e-mail folders.

On 12/13/2019 6:57 PM, Jon Paris wrote:
If you have two keys the worst case scenario is 2 procedures, A in B,
and B in A. Unless you also need A only and B only. That would be four
procedures but could be achieved by just two and short circuit logic when a
single key was needed.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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.