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

I've seen a lot of debates about embedded SQL versus RPG. Couldn't we have some kind of guideline in the WIKI to help choose between the 2 ?

I have the following problem. I have a file with 4.5 million records. I have to see if a client exists in the file with a mouvement created at a certain date.
I will create a procedure for this.

Should I use SETLL then READE with the client until I find the record or should I use SQL ?

What are the reasons for the choice ?

Performance ? I'm not qualified to say which would be best.
If I did it with SQL, I would also probably try different requests that I would test with Visual Explain. I mean, to see if at least 1 line exists, there's SELECT with FIRST ROW ONLY, COUNT(*) and EXISTS.

Readability ? The same in RPG or SQL. Or depending on which the following programmer is more used to.

Time taken to do the work? If I only had RPG, the job would already be done.




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.