× 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: User Index APIs
  • From: David Morris <dmorris@xxxxxxxxxxxxx>
  • Date: Mon, 02 Feb 1998 14:34:31 -0700

We have several procedures that use the user index APIs.  They are used to 
create and store variable length keyed information.  They work correctly but 
the API that retrieves entries seems to pass back conflicting length and offset 
information.  IE:  Place 12 bytes of information with an offset of 0 on the 
user index.  The key is 8 bytes, and the data is 4 bytes.  Retrieve the entry 
by equal key and the bytes available and returned are both 16.  The offset and 
length returned are 8 and 12.   The four byte entry is in positions 17-20.  
What are the available and returned saying?  By ignoring the available and 
returned parameters it seems to work as expected.  I cannot find any example to 
see where we have misinterpreted the parameters.

Does anyone have an example which uses a variable length user index?  I 
remember an article a few years back in one of the magazines that used user 
indexes to print a sorted report.  I don't remember if it used fixed or 
variable length entries.  The code we are using was based on trial and error 
testing.  It works for the 8 user indexes that we have but it would be nice to 
understand what is going on.

This application used to use data queues but there was a noticeable impact on 
performance when the length of the information varied by more than about 50%.  
Variable length fields in a database probably would have worked fine but we 
decided that the user index would require the least conversion.  After spending 
a day trying to understand the returned parameters it probably would have been 
a wash.

Thanks for any input,

David Morris
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+---
| 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 MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.