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