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



You are correct Alan.  We are actually moving more to using embedded SQL
for file I/O and it is easier, usually.  However, there are still many
many programs doing it the traditional way as well as traditional
programmers who do not want to use SQL.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Wednesday, February 28, 2007 6:40 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: CHAIN Versus SETLL and READ When Data Needed

I know this is a question about which is more efficient but wouldn't the
answer be neither?

In other words, wouldn't this be much more efficient to use SQL
especially if you have multiple records? 

If it was only one record, it wouldn't matter but if you had many
possibilities, SQL would only bring in the records that matched your
condition. If all the matching records where being updated the same way
you could just issue an Update.

If not, wouldn't you issue a

EXEC SQL DECLARE UP_CUR CURSOR FOR
           SELECT PROJNO,
                  PRSTDATE,
                  PRENDATE
             FROM PROJECT
             FOR UPDATE OF PRSTDATE,
                           PRENDATE;

because you know every record is being updated?

Anyway, my two cents.  




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.