|
Hi Tim, The following program shows the way to get member names using Toolbox/JTOpen with Java. args[ 0 ] must be an IP address or resolvable name for the AS/400. args[ 1 ] must be the file name, using this syntax: /QSYS.LIB/MYLIB.LIB/MYFILE.FILE So, call it like this: java PFMember 127.0.0.1 /QSYS.LIB/MYLIB.LIB/MYFILE.FILE The output is of the form: MEMBERNAME.MBR ------- Begin program ---------- import com.ibm.as400.access.*; public class PFMember { public static void main( String[] args ) { AS400 as400 = new AS400( args[ 0 ] ); IFSFile ifsf = new IFSFile( as400, args[ 1 ] ); try { String[] asMembers = ifsf.list(); for( int i = 0; i < asMembers.length; i++ ) { System.out.println( asMembers[ i ] ); } } catch( Exception e ) { System.out.println( e.getMessage() ); } } // end main } // End class PFMember ------- End program ---------- Joe Sam Joe Sam Shirah - http://www.conceptgo.com conceptGO - Consulting/Development/Outsourcing Java Filter Forum: http://www.ibm.com/developerworks/java/ Just the JDBC FAQs: http://www.jguru.com/faq/JDBC Going International? http://www.jguru.com/faq/I18N Que Java400? http://www.jguru.com/faq/Java400 ----- Original Message ----- From: "Hatzenbeler, Tim" <thatzenbeler@xxxxxxxxxxxxx> To: "'Java Programming on and around the iSeries / AS400'" <java400-l@xxxxxxxxxxxx> Sent: Thursday, August 28, 2003 6:24 PM Subject: Members > Is there a method, that will to me the members of a file? > > Thanks, tim >
As an Amazon Associate we earn from qualifying purchases.
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.