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



hi,

i'm trying to read a file with a key. there is no problem if i try to read some 
records in the middle of the file. but if i want the first record i get the 
following error:

class com.ibm.as400.access.AS400Exception : CPF5001 null

i'm using the method: keyedfile.positionCursorBefore(key,numberOfKeys)

i don't get the error if i use the method:

keyedfile.positionCursor(key,numberOfKeys)

but then i don't get the first record cause i use the method:

keyedfile.readNextEqual(key,numberOfKeys)

could someone please tell me how to get the records correctly?

i'm using jtopen 3.1 .

my code looks like this:

file.positionCursorBefore(key,numKeys);
while ((record = file.readNextEqual(key,numKeys)) != null)
{
        vector.addElement(record);
}

thanx in advance


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.