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



CHAIN is basically SETLL and READ, so the difference is the time to read
the record. Mileage will vary, based on record length and datatypes. What
were your fields in the file in question?

The other factor here is that SETLL will have less IO than CHAIN - possibly
only to the index (sorry, logical file). This can affect others' access to
DASD.

At 08:56 AM 3/12/02 -0700, you wrote:
> > From: <David.X.Kahn@gsk.com>
> > Nathan wrote:
> >
> > >> Why not use a CHAIN?
> > >
> > > You took the first thought that came to my mind and put it into
> > > words <smile>.  Or, why not use SETLL for better performance?
> >
> > Because it's a fallacy. :-)
> >
> > Dave...
>
>I wrote the following program to test CHAIN vs. SETLL.  It did surprise me
>that CHAIN took only 13% more time.  That's not much difference.  Thank you
>for pointing out the not-so-obvious.
>
>      Ftestio    IF   E           K DISK
>
>      D myKey           S             12A   Dim(10000)
>      D i               S             10I 0
>      D Now             S               Z
>      D Then            S               Z
>      D Secs            S             10I 0
>
>       *-----------------------------------------------------------------
>
>      C                   For       i = 1 to 10000
>      C                   Read      testior
>      C                   Eval      myKey(i) = tikey
>      C                   EndFor
>
>       *-----------------------------------------------------------------
>
>      C                   Time                    Then
>      C                   For       i = 1 to 10000
>      C     myKey(i)      Setll     testio                                 70
>      C                   EndFor
>
>       *-----------------------------------------------------------------
>
>      C                   Time                    Now
>      C     Now           Subdur    Then          Secs:*MS
>      C     Secs          Dsply
>
>       *-----------------------------------------------------------------
>
>      C                   Time                    Then
>      C                   For       i = 1 to 10000
>      C     myKey(i)      Chain     testior                            70
>      C                   EndFor
>
>       *-----------------------------------------------------------------
>
>      C                   Time                    Now
>      C     Now           Subdur    Then          Secs:*MS
>      C     Secs          Dsply
>
>       *-----------------------------------------------------------------
>
>      C                   SetOn                                        LR
>      C                   Return
>
>Nathan M. Andelin
>www.relational-data.com
>
>
>_______________________________________________
>This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
>To post a message email: MIDRANGE-L@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
>or email: MIDRANGE-L-request@midrange.com
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/midrange-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.