×
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.
Ran across something kind of curious recently. I have a keyed file (key
field is 4A and contains digits, including leading zeroes - '0736',
'0877', and '1389'). I use the following operation -
setll '0000' filename;
%found(filename) returns *ON - yes, Virginia, there are records with
values in the key field that are greater than '0000'.
Of course (famous last words), %equal(filename) returns *OFF. No record
whose key value is '0000'.
Now I had not remembered I could specify an RRN when using SETLL and was
curious to see how that might work. So I tried this -
setll 0 filename;
Now %equal(filename) is, again, *OFF - there is no record whose RRN = 0.
But %found(filename) is *OFF, which seems odd, because the following
description of SETLL is matched -
The SETLL operation positions a file at the next record that has a
key or relative record number that is greater than or equal to the
search argument
I also did this using fixed-format and checked the NR indicator, which
is *ON. Because the NR is *ON (%found() is *OFF), we are positioned (see
replies to my recent post) at end-of-file, so a READ turns on EOF.
The doc says this - "If access is by relative record number, search-arg
must be an integer literal or a numeric field with zero decimal
positions." It doesn't say, for RRN, that the search-arg has to be > 0.
I'm working on 7.1 of the OS.
Seems to me that there ARE records found when using 0 as the search
argument, so the NR indicator should be *OFF - is this a special case?
Or have I missed something again?
Cheers
Vern
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.