Hi I'm trying to read all the CL (sources file ) from an AS400 machine.I'm working on the windows xp platform tried to open the file with java on the followinfg code.
public static void main(String[] args)
{
String sourceName = "/OTOL/YSREEL";
IFSFileInputStream source = null;
AS400 system = new AS400("M320","myuserid","mypassword");
try
{
system.connectService(AS400.FILE);
System.out.println(system.getVersion());
}
catch (Exception e)
{
System.out.println("Error: " + e);
}
try
{
source = new IFSFileInputStream(system,
sourceName,
IFSFileInputStream.SHARE_NONE);
int available = source.available();
IFSKey key = source.lock(8);
byte[] data = new byte[8];
int bytesRead = source.read(data, 0, 8);
System.out.println(bytesRead);
}
catch (Exception e)
{
System.out.println("Error: " + e);
}
}
OTOL is an library and YSREEL is and CL source file.
I can connect the machine but it give me the folowwing exception there :
Error: java.io.FileNotFoundException: /OTOL/YSREEL
can anyone help me?