× 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 Dave,

Hi all, I need to list some advantages of using embedded sql in rpg
programmes over using ordinary rpg code.

1) I assume you already know the advantages of OPNQRYF? SQL can do anything OPNQRYF does, except it's simpler to code, and it runs faster.

2) Once past the learning curve, we've found that embedded SQL increases programmer productivity. Programs that previously took 2 days to write and debug can now be written in 2 hours. (Assuming, of course, that it's the type of program where bringing together data from lots of files is useful.)

3) SQL is the standard language for database access across all platforms, database engines and programming languages.

4) IBM invests heavily in DB2 for i, mostly in features that are only available via SQL. To take advantage of new features, you really need to be using SQL.

5) You can add fields to files that use embedded SQL without recompiling the programs.


We don't actually use DDL, so I'm assuming that there are far less
advantages in our case. Right or wrong?

I don't agree with that AT ALL. Whether you use DDL or not has little to do with the value of embedded SQL. DDL and DDS are both source code for creating a file. The resulting *FILE object is the same, and querying it with SQL is the same. (Other than a few very minor bits, that is -- but those bits apply equally to RLA and SQL)

If you have program-described files. (Files with no external definition.) THEN you'll lose many of the advantages of embedded SQL when accessing those files. But whether you use DDL or DDS is pretty much irrelevant.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.