|
Thank you very much for pointing that out to me. I must say that was a real
easy way to fix my problem with CheckConnect. Now that is working, I have
one more error that I get when I try to do a record level access test. The
following is the error message that I get:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at TestRecordLevelAccess.main(TestRecordLevelAccess.java:6)
Again this is a test program from the website. The code is as follows:
import com.ibm.as400.access.*;
class TestRecordLevelAccess
{
public static void main(String argv[]) {
AS400 system = new AS400();
String filePath = (new QSYSObjectPathName(argv[0], argv[1],
"FILE")).getPath();
SequentialFile file = new SequentialFile(system, filePath);
try {
system.connectService(AS400.RECORDACCESS);
RecordFormat format =
(new AS400FileRecordDescription(system,
filePath)).retrieveRecordFormat()[0];
String fields[] = format.getFieldNames();
file.setRecordFormat(format);
file.open(AS400File.READ_ONLY, 100, AS400File.COMMIT_LOCK_LEVEL_NONE);
Record record = file.readNext();
for (int i = 0; i < fields.length; i++)
System.out.println(fields[i] + ": " + record.getField(i));
}
catch (Exception e) {
System.out.println(e);
}
System.exit(0);
}
}
Any help is greatly appreciated!
> -----Original Message-----
> From: Blair Wyman [SMTP:blairw@us.ibm.com]
> Sent: Wednesday, November 22, 2000 9:56 AM
> To: JAVA400-L@midrange.com
> Subject: Re: Yet Another Newbie Question
>
>
> Based on the error message, it would appear that you are invoking the java
> command like this:
> java CheckConnect.java
>
> While you certainly need the '.java' to compile, you leave off the '.java'
> when you invoke, like so:
> java CheckConnect
>
> -blair
>
> Blair Wyman -- IBM Rochester -- (507) 253-2891
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "The first principle is that you must not fool yourself -
> and you are the easiest person to fool." -- Richard P. Feynman
>
> +---
> | This is the JAVA/400 Mailing List!
> | To submit a new message, send your mail to JAVA400-L@midrange.com.
> | To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> JAVA400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner: joe@zappie.net
> +---
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.