× 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 vs. SETLL (was Re: DOW vs DOU)
  • From: Dave Mahadevan <mahadevan@xxxxxxxx>
  • Date: Tue, 03 Jun 1997 15:03:08 -0400
  • Organization: Stoner and Associates

Kahn, David wrote:
> 
> On Jun 02 1997 mark wrote:
> 
> > Nice theory, but it's incorrect.  RPG II also sets the file cursor for a
> >succcessful CHAIN.
> 
> Mark,
> 
> You are right. I wasn't certain before because I couldn't find any
> confirmation in the System/36-Compatible RPG II manual. However, I just went
> back for a really good look and found:
> 
>      If a READE operation is not successful, you must reposition
>      the file by using either a SETLL or a CHAIN operation.  If the
>      file is not repositioned, all following READ, READE, and READP
>      operations will fail.
> 
> So was Greg Thielen wrong when he wrote the following?
> 
> >>There was also a time (pre-AS/400 and even S/38 I think)
> >>when CHAIN didn't set the file pointer as it does now.  You _had_ to
> >>use SETLL/READ.
> 
> RPG historians?
> 

SETLL always sets the file pointer even in S/34 ! The problem was when
the pointer would be beyond the end of file, in which case SETLL will
fail and the pointer will remain where it was before the SETLL.  Now we
have the hi indicator available to signify this condition.  

Also, From ILE RPG manual 

    SETLL does not cause the system to access a data record.  If you
are only interested in verifying that a key 
    actually exists, SETLL with an equal indicator (positions 75-76) is
a better performing solution than the CHAIN 
    operation in most cases.  Under special cases of a multiple format
logical file with sparse keys, CHAIN can be a 
    faster solution than SETLL.
 


Thank You.

Regards

Dave Mahadevan.. mailto:mahadevan@fuse.net
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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 ...

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.