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



Rolf Mittag wrote:

>That's just as I do it for now. I've a service-program for
>all Sql. But that's _definitivley_ _not_ desirable as a design
>because it makes simple things more complicated.

As you say, it makes simple things more complicated, but nowadays, what is
simple anymore?  The old way would be:
cust chain rcustmas
     if not %found
The new way might be:
if getCustRecord(cust) = NOTFOUND

Either code is easy to understand.  The complexities come from creating the
service program and binding it to the program.  (Is there a good name to use
for "the program that uses the service program?")  :-)

>How will you handle conditional compile of sql-statements?
Right now, I don't use conditional compile for SQL.  As you note, the
pre-compiler is... lacking in features.  By "nesting" subprocedures, I don't
need to use conditionals.  What I mean is that I have a primitive
setllCustRecord and chainCustRecord, etc. that I define as "internal" to the
data manipulation service program.  These can use SQL or RPG depending on
performance needs.  All they do is simple position/fetch operations.  I then
create higher level subprocedures that use the primitives.  These use no SQL
and are exported from the service program.

>By the way, the sql-precompiler also declares nested copies
>to be illegal and has problems with o-specs.

Yes, I know.  That's why somebody (Toronto?) invented /INCLUDE.  The
pre-compiler is very poor compared to the RPG compiler - typically several
releases old in terms of functionality.

>thanx for your comments

Rolf, thank you for the discussion.  It's always good to hear someone else's
thoughts on program design!

Buck Calabro
Aptis; Albany, NY
"Nothing is so firmly believed as
 that which we least know" -- Michel Montaigne
Visit the Midrange archives at http://www.midrange.com
+---
| 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-Ups:

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.