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


  • Subject: RE: CHAIN versus SETLL
  • From: Bob Cozzi <BobCozzi@xxxxxxx>
  • Date: Tue, 20 May 1997 13:14:27 -0500



The issue with SETLL vs CHAIN is that SETLL doesn't lock the database 
record when you're just checking to see if the record exists. However, the 
new N (no lock) operation extender (that's the old "Half Adjust" column to 
you RPGII coders) essentially provides a way to avoid locking the db 
record. CHAIN is a direct-to-the-record process, whereas SETLL does 
(metaphorically speaking) a CHAIN with no lock, followed by a READP.  This 
allows the next READ to access the next record in the file. (It doesn't 
actually do a READP, folks, so don't write letters <g>).

So I suppose there is a little performance difference in that CHAIN with No 
lock does fewer things. But hey, I don't believe in rules that say "This is 
always better than that".  If SETLL does the job the right way for the task 
at had, USE IT!  If CHAIN with No lock works for you, then use that.  In 
either case, you probably won't shave enough off a job that runs 2 or 3 
hours to notice.

Bob Cozzi

-----Original Message-----
From:   Wayne Achenbaum [SMTP:wache@vicomnet.com]
Sent:   Tuesday, May 20, 1997 12:37 PM
To:     MIDRANGE-L@midrange.com
Subject:        CHAIN versus SETLL


The issue with SETLL vs CHAIN is that SETLL doesn't lock the database 
record when you're just checking to see if the record exists. However, the 
new N (no lock) operation extender (that's the old "Half Adjust" column to 
you RPGII coders) essentially provides a way to avoid locking the db 
record. CHAIN is a direct-to-the-record process, whereas SETLL does 
(metaphorically speaking) a CHAIN with no lock, followed by a READP.  This 
allows the next READ to access the next record in the file. (It doesn't 
actually do a READP, folks, so don't write letters <g>).

So I suppose there is a little performance difference in that CHAIN with No 
lock does fewer things. But hey, I don't believe in rules that say "This is 
always better than that".  If SETLL does the job the right way for the task 
at had, USE IT!  If CHAIN with No lock works for you, then use that.  In 
either case, you probably won't shave enough off a job that runs 2 or 3 
hours to notice.

Bob Cozzi

I recently attended the April Common in Boston. A junior programmer I work 
with took an intermediate Rpg class. The instructor taught the class that a 
setll was more expensive than a chain on a no hit condition. Can anyone 
back this up or refute this? Please state some reasoning behind the answer 
to this question. I was always taught to use a setll, not a chain when 
record existence was the only task at hand.
--
Wayne Achenbaum
Slomin's Inc.
125 Lauman Lane
Hicksvlle, NY 11801-1886

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.