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



Charles,

Thanks for the information

John


-----Original Message-----
From: Charles Wilt [mailto:charles.wilt@xxxxxxxxx]
Sent: Friday, November 02, 2012 12:32 PM
To: RPG programming on the IBM i / System i
Subject: Re: Should I replace all CHAIN, SETLL, and READs to
SQL

Yes, SQL allows access via RRN, but you do not want to use
it. As accessing via RRN forces a full table scan.

Unless you plan to add a unique key, I'd stick with RLA.

Furthermore, simply replacing RLA op-codes with the SQL
equivalent is usually a bad idea; since the program is still
designed for record at a time processing. RPG RLA is
optimized for record at a time, SQL is not.
SQL is designed to process sets. May not be such a big
deal in an interactive program...but for a batch program
you'll end up with horrible performance.

HTH,
Charles


On Fri, Nov 2, 2012 at 11:06 AM, John Allen
<jallen@xxxxxxxxxxx> wrote:



I have been thinking about changing all CHAINs SETLLs and
READs in our
software to SQL



Our programs use these operations for various reasons such
as:

Simple SETLL to check if a value is valid

Reading records for loading subfiles

Chaining by RRN (used in subfile processing, the input
file does not
have a unique key so RRN is stored in Subfile then used
for accessing
the original record)

Reading and chaining to several files for processing
thousands of
records and doing validations, calculations etc.



My main concern would be:

How this would affect performance

Does SQL allow for accessing records by RRN.



Does anyone have any thoughts on why this is a good or bad
idea



Thanks



John



--
This is the RPG programming on the IBM i / System i
(RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.