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



I don't know if I would agree with that Scott.

The SQL CLI interface was designed for C programmers and requires a translation of the C type variables to RPG type variables and knowledge of calling System API's. Not trivial knowledge.

In other languages, using ODBC interfaces is pretty simple and there are a million examples floating around.

Not so in the AS/400 world. In the AS/400 world calling procedures is a big deal. In the VB or other worlds it is just part of the gig. Most people couldn't imagine doing it any other way.

Also most PC languages have wrappers that hide most of the complexity. You just use those API's instead of programming directly to the ODBC API which is what SQL CLI is.

I don't know if anyone has written a service program wrapper for the SQL CLI functions. Don't know how often it would get used. Would be an interesting project.

Anyway, my opinion only.

-------------- Original message ----------------------
From: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
Hi Vern,

The only way now to use a stored procedure in an RPG program is to
use SQL/CLI - the call level interface - not necessarily for the
faint of heart, although I do use it in some of our stuff.

Heh... it's not "the only way". There are other ways! You could call
JDBC instead of CLI. Or you could launch the db2 QShell command via the
spawn() API, and read back it's results, etc.

CLI is just the "easiest" way, and performs the best.

I find it interesting that you say it's not for the feint-of-heart, yet,
CLI is the programming interface of ODBC, and is "the standard" for
writing apps that do database access! It goes to show how spoiled we
are in RPG, where embedded SQL is easy, and record-level I/O is easy.
Other languages all use CLI, or something very much like it (like JDBC)
any time they do database access.
--
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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.