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



Hi David

I agree that SQL is great for this kind of dynamic processing - and using the SQLDA might even make it more flexible, although I've never done that - just read about it.

On the other hand, a fellow named Julian Monypenny developed a set of service programs to externalize database IO - in the late 90's. It does not work for all the new features, like NULL-capable fields, etc., since it uses an internally-defined file that you process according to the file field descriptions. Anyhow, something similar could be done using the C record runtime functions - it'd be pretty cool, I think, for some stuff.

Still, for ultimate flexibility, SQL is hard to beat. E.g., we have seen examples in this list of changes the sort of a subfile using CASE in the ORDER BY - very cool!

JMNSHO
Vern

On 2/24/2011 7:43 AM, David FOXWELL wrote:
Thanks all,

We often end up debating when sql has an advantage over rla but I don't ever recall this being put forward as one of them.
Surely as soon as one knows that in an application a user is going to effectively select a set of records himself then one should be thinking SQL from the start?

I know of one application that first showed clients selected by name. Then they added a number. Then maiden name followed and company name. The code is really ugly without sql.

-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Jerry C. Adams
Envoyé : jeudi 24 février 2011 14:27
À : 'RPG programming on the IBM i / System i'
Objet : RE: READE on a file selected by user

Here, here. I admit that I usually forget about this (using
embedded SQL).
But I recall one inquiry a few years back where everybody and
their second cousins wanted different selections and
sequences. I wound up writing a selector panel where they
could put in just about anything they wanted (well, within
reason, as defined by me) and sort (order by) whatever.
Building the SQL wasn't too bad.

Jerry C. Adams
IBM i Programmer/Analyst
I found a delivery in my flaw. -Don Quisenberry
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Helge Bichel
Sent: Thursday, February 24, 2011 6:45 AM
To: 'RPG programming on the IBM i / System i'
Subject: RE: READE on a file selected by user

Hi David.

It's better and much more flexible using SQL for this task.

I know starting with dynamic SQL constructing the SQL with
Select, Order By etc.
and implementing the processing of Declare, Open, Fetch etc.
can be a challenge, but done once I believe you would never
go back using various SETLL, READE processing.

Brgds
Helge


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]

Sent: Thursday, February 24, 2011 1:01 PM
To: RPG programming on the IBM i / System i
Subject: READE on a file selected by user

Hi,

I'm sure someone must have already run into this problem :


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.