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



On Wed, Feb 24, 2016 at 4:23 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
On 2/24/2016 2:24 PM, Steve Richter wrote:
use SQL just like it is used in RPG. With substitution variables. And
return variables.

Ah. Is this so you don't have to have the RPG compiler?

I imagine it's so that he can more conveniently incorporate SQL into
programs that are otherwise a more natural fit for CL than for RPG.
(That is, tasks which you can of course do in RPG, but then the
"scripty" parts will consist of a lot of calls to QCMDEXC or QCAPCMD.)

Now, I have personally found CL pretty near abysmal as a scripting
language, so I haven't ever wished for a SQLCLLE, but I'm sure others
would eagerly welcome such a thing. Hey, some folks do RLA file
processing with CL today. And some folks call system APIs with CL
today; for those APIs which now have SQL services available, I'm sure
a good percentage of those folks would find it handier to use the SQL
services.

I pass an SQL statement to an RPG procedure from CL.
But that is too time consuming to write the code to build the SQL statement.

Not following the point; the SQL statement needs to be built at some
point, right?

Well, if RUNSQL is the best you can do in CL right now (is it? I don't
know), then building SQL statements in CL is markedly more clunky than
in RPG. First, CL itself has traditionally had much worse string
handling than RPG IV, though maybe it's catching up. Second, you don't
have the placeholders/parameters that you have in SQLRPGLE.

I understand CL has its domain that it operates in. RPG has its domain. And
SQL procedures also is a domain. Would be good to have all 3 as equal ILE
languages. I am duplicating too much code between SQL procedures and ILE
RPG. Same with CL.

I actually don't fully understand the last couple of sentences there.
If each has its domain, then there should be relatively *little*
overlap, no? And if all three were to become "more equal" as ILE
languages, then wouldn't there be even more overlap than there
currently is? So I am not getting what's duplicated.

From my point of view, CL's "domain" superficially seems to be
scripting. But it's pretty terrible at general-purpose scripting
(compared to bash, Rexx, almost anything you can think of), and the
things where CL really *is* the best fit are shrinking as RPG becomes
more usable and more services are exposed via SQL.

For folks who normally use RPG (including possibly embedded SQL) for
almost everything, but need something else for scripting, and who wish
they could unify those, my recommendation remains Python, especially
iSeriesPython.

John Y.

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.