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




Yet another option is the SQL CLI. This is an interface to SQL that's included with i5/OS (or OS/400) -- it does not require 5722-ST1. It can be used from any ILE language including ILE RPG. (and even ILE CL starting in V5R3, thanks to CL's *BYVAL support!)

IMHO, it's easier to use and the code is easier to read than the QSQPRCED API.

For someone familiar with ILE concepts, it's only a little harder to use than embedded SQL. The only disadvantage is performance, since the statements aren't prepared at compile time, only at run-time... much like the PREPARE statement in embedded SQL. But, I've never found the performance difference to be very noticable.

Once of the things I really like about the CLI is that it just works.
I'm not constantly fighting with it over the new RPG features. With embedded SQL, I seem to keep running into things that don't work with the precompiler. Such as trying to fetch into local variables. Or using nested data structures. Heck, embedded SQL didn't even support free format RPG until V5R4. None of these things were ever a problem with the CLI.

Another thing I like about the CLI is that I can use it to call stored procedures and actually read the result set! AFIAK, it's not possible to read a stored procedure's result set with embedded SQL.

But, embedded SQL is a little simpler to code, and does perform better especially when you have extremely complicated SQL statements.

Anyway... it's something to think about.


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.