Thursday, January 13, 2005

Listing objects in an as400 library from java/jt400

Listing objects in an as400 library from java/jt400

ObjectList libs = new ObjectList( sys, "QSYS",
ObjectList.ALL, "*LIB" );
libs.load( );

or

use the IFSFile object to list directories (including qsys.lib)
private IFSFile[] getNewFiles(IFSFile monitoredDir, String newExt)
throws IOException
{
IFSFile[] list = monitoredDir.listFiles("*.*");
if (list != null && list.length > 0)
return list;
return null;
}

And there you have the java code you can run on your as400

No comments:

Post a Comment