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


  • Subject: RPG and SQL Compilers
  • From: Jon.Paris@xxxxxx
  • Date: Sat, 30 Dec 2000 15:35:05 -0500


 >> I understand what the precompiler does.  What I dont understand is why
it is necessary to have an SQL precompiler at all.

 >> Why not have the RPG compiler Understand SQL.

It is a good question, but the proposed solution " ... have the RPG
compiler Understand SQL" would in the long run be not much better than the
current situation.  You simply move the emphasis from SQL understanding RPG
to RPG understanding SQL - admittedly a simpler task most of the time but
....

Historically, for whatever reason, Rochester chose to implement SQL as a
pre-compiler.  This has a number of disadvantages, not the least of which
is the one most commonly perceived by users i.e. that RPG introduces new
features and SQL does not understand/tolerate them until a later release.

A much better solution would be to have RPG simply understand the "Start of
SQL stuff" and "End of SQL stuff" and to pass all the code between these
two to the SQL compiler.  The SQL processor would then compiles its code
"asking" the RPG compiler (via an API) for information on the size and type
of the host variables etc.  This way neither compiler has to know anything
about the other and each is free to implement whatever changes they like
with zero impact to the other.  This is closer to the method used in other
DB2 "flavors".

A change in the compilers is obviously not quite as simple as this makes it
sound - how do you handle the listing of errors for example - but it is
doable.  Both Rochester and Toronto have an interest in resolving this so
it comes down to a simple matter of time and money!

One question that recently came up during some discussions I had with the
developers on this topic is "what about compatibility?"  How long would the
old and new methods have to co-exist?  Would it be satisfactory to freeze
the current pre-compiler?  How many years before it could be phased out
completely (remember that keeping it available with new releases is _not_ a
zero cost item).

If you have any comments, please post them to the list and I'll forward
them to the appropriate people.

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.