Hi people,

I debuged my simple java program in the following and found it stopped when it 
reached  "RecordFormat fmt = new AS400FileRecordDescription()" statement. Can 
anyone tell me what the possible problem is? The ports drda, 
as-signon,as-srvmap etc have already opened in AS400.

FYI, I have followed the troubleshooting tips in 
http://www-1.ibm.com/servers/eserver/iseries/toolbox/troubleshooting.htm, but 
still can't solve the problem.

Thanks in advance,


import com.ibm.as400.access.*;
 * @param 
 * @since Sep 2, 2004
public class TestFile {
 public TestFile() {
 public void doit() {
  try {
   AS400 as400 = new AS400("", userName, password);
//   as400.connectService(AS400.RECORDACCESS);
   QSYSObjectPathName fileName = new QSYSObjectPathName("%LIBL%", "UTS005TX", 
"%FIRST%","MBR" );
   SequentialFile file = new SequentialFile(as400,fileName.getPath());   
   RecordFormat fmt = new 
   file.open(AS400File.READ_ONLY,1, AS400File.COMMIT_LOCK_LEVEL_NONE);
   Record rs = file.readNext();
   while (rs != null)
   { if(rs.getField("T@LANG").toString().equals("E")){
    rs = file.readNext();
   String lblTitle = rs.getField("T@0001").toString();
   String lblSubNum = rs.getField("T@0002").toString();
   String lblPayAmt = rs.getField("T@0003").toString();
   String lblCode = rs.getField("T@0004").toString();
   System.out.println(" title = [" + lblTitle);
//   as400.disconnectService(AS400.RECORDACCESS);

  } catch (Exception err) {
   System.out.println(" Error connect to AS/400" + err);
 public static void main(String[] args) {

  TestFile a = new TestFile();
  System.out.println(" this is out from main"); 

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