×
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 works with partial keys.
Chain works on partial key and if found it returns the record.
Works great on partial keys in externally-described mode. Not so great
in program-described mode.
I created a test program that attempted to retrieve a record from a
2-key file, opened as program-described, using only the leading key.
If I tried a chain on the leading key field itself, it wouldn't even
compile, because the declared key length (the full composite key length,
in order to allow for retrieval by the complete key) didn't match the
length of the key I was passing to CHAIN.
And if I put the partial key into a data structure of the appropriate
length, whether the rest of the structure was zeros or blanks, it failed
to find the record that was known to exist in the file.
The only way I could get it to do a partial key CHAIN was to declare the
key length as that of the partial key, and CHAIN on that field alone.
Which would prevent CHAINing on the complete key.
Is there a trick I don't know about, short of having the file declared
and opened twice, that would allow a file opened as program-described to
be CHAINed successfully on either the leading key field or the full key?
--
JHHL
As an Amazon Associate we earn from qualifying purchases.
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.