Another interesting philosophy question.

When embedding SQL calls in RPG I have seen two schools of thought.

-Embed your SQL processing into your RPG code.

-Embed you SQL processing into the DB itself: Stored Process/SQL Functions, etc…. and call those from RPG.

Personally I like putting my SQL logic into my RPG code as it’s much more debuggable whereas I don’t think it’s simple to debug SQL stored procedures and functions.

In other words I try to keep the actual access logic as simple as possible and put business logic in re-usable code. I generally call the the business layer.

I do this similarly in other languages. And generally I haven’t replied a lot on stored procedures in any language or database. I put all my DB and business logic in separate modules.

I’m just curious what other here favor when writing their RPG logic. Embedded SQL in RPG or using Sprocs/Functions and keep your RPG dumb as a stump/simplified :-)

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx



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