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



But there is no record with RRN zero. If I issue the SETLL operation the
pointer is set prior to the row with the same key. No record has key
zero, so SETLL 0 fails, there is a record 1 so the pointer can be set just
prior to that record. IDK, seems right to me. I have used SETLL, READ
and CHAIN on RRN files a lot over the years (subfiles are RRN files).

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Brian
Parkins
Sent: Tuesday, December 08, 2015 3:38 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: Re: Possible intereting SETLL behavior

Vern said:
So it may be - but this has been a digression - I was not checking other
than the error indicator when using *START, while I DO use the %found()
indicator when using 0 as the search-arg.

I wonder if someone else will be able to verify the behavior.

It does still seem odd that SETLL 0 file; for an arrival-sequence file
sets %found() to *off - there ARE records whose RRN > 0 (18 of them in the
file I'm reading), and this satisfies the definition of SETLL, unless
there is some unspoken special processing here.
--------------------------
FWIW, (just tested to double check):

SETLL 0 - %FOUND is *OFF
Subsequent READ will not retrieve a row

SETLL *START - %FOUND is *OFF
Subsequent READ _will_ retrieve the first row

SETLL 1 - %FOUND is *ON
Subsequent READ _will_ retrieve the first row

Curious that the use of *START does _not_ affect %FOUND.

Brian.



--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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.