× 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

Don't forget to mention the IP or the name of the iSeries, your username
and your password.
This command runs only if you have been connected to the iSeries yet.
AS400 as400 = new AS400(); 

>From a PC, it is a remote access. Try:
AS400 as400 = new AS400("myISeries","myUsername", "myPassword"); 
Also, check if you have the right to the RECORD ACCESS service on your
iSeries.

Farouk
@+

-----Message d'origine-----
De: "Michael Bruton" <mcbruton@xxxxxxxxx>
A: "'Java Programming on and around the iSeries / AS400'"
Date: 30/05/03
Objet: Attempting to connect to iSeries from simple PC program

 This is a beginner's question.  We are trying to provide access
to provide access to the AS400 from a PC as part of a larger project.  I
am not using an IDE - just a text editor and the DOS command line, right
now.

 On the list there was a simple access test called
CheckConnect.java, and I compiled and ran that, and I was able to
connect to the extent that the following code worked:

      AS400 as400 = new AS400(); 
      SystemValue model = new SystemValue(as400, "QMODEL"); 
      SystemValue serial = new SystemValue(as400, "QSRLNBR"); 

      as400.connectService(AS400.COMMAND); 

      System.out.println("System: " + as400.getSystemName()); 
      System.out.println(" Model: " + model.getValue()); 
      System.out.println("Serial: " + serial.getValue());

 
 I was prompted for the system, my user ID and password, and I
got back the system values.

 However, when using a sample program in the IBM Toolbox for Java
manual from InfoCenter, my connection is consistently refused.  I am
using code like this:


 // Create AS400 obj and connect for the record level access
service.
      AS400 iSeriesSystem = new AS400(systemName);
      try
      {       
         iSeriesSystem.connectService(AS400.RECORDACCESS);
      }
      catch(Exception e)
      {             
         e.printStackTrace();
         System.exit(0);
      }


 Again, I sign on using my system's TCP/IP address, my user id
and password, but this time I get a series of errors:

com.ibm.as400.access.InternalErrorException: Data stream is not known.
at com.ibm.as400.access.DDMEXCSATReplyDataStream.checkReply(DDMEXCSATRep
lyDataStream.java:48)
at com.ibm.as400.access.AS400ImplRemote.exchangeDDMSecurityInfo(AS400Imp
lRemote.java:454)at
com.ibm.as400.access.AS400ImplRemote.getConnection(AS400ImplRemote.ja
va:822)
at com.ibm.as400.access.AS400ImplRemote.connect(AS400ImplRemote.java:340
)
at com.ibm.as400.access.AS400.connectService(AS400.java:703)
 at RLSeqAccEx.main(RLSeqAccEx.java:64)


 No logs have been found on the iSeries to cover this rejection.


 Any an all help would be greatly appreciated.  We would like to
explore some Java solutions that require remote connections.

Michael C. Bruton
mcbruton@xxxxxxxxx
 



_______________________________________________
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


_______________________________________________
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France

_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France




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.