× 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: RE: Yet Another Newbie Question
  • From: "Buckingham, Ed" <Buckingham@xxxxxx>
  • Date: Wed, 22 Nov 2000 10:52:21 -0500

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