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



I happened to stumble accross a problem today by mistake.

I have a KeyedFile object, say file.  I am trying to mimic a setll and reade
in RPG terms.  The KeyedFile has 6 fields in the key but I'm only concerened
with the first field.  The first key field is a 2S 0 in DSS.  Here is a code
snipet.

KeyedFile = new KeyedFile(system,  path);

file.setRecordFormat((new AS400FileRecordDescription(system,
path)).retrieveRecordFormat()[0]);

file.open(AS400File.READ_ONLY, 0, AS400File.COMMIT_LOCK_LEVEL_NONE);

Object[] key = new Object[1];
key[0] = new BigDecimal("01");

file.positionCursorBefore(key);

Record record = file.readNextEqual(key);

The problem is, when the file only has one record it will not get a hit on
the readNextEqual?

What am I doing wrong here?


Robert Upshall
Professional Software of Amarillo
(806) 358-8928
rupshall@psasoft.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.