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";
IFSFileInputStr eam source = null;
AS400 system = new AS400("M320","m yuserid","mypas sword");
try
{
system.connectS ervice(AS400.FI LE);
System.out.prin tln(system.getV ersion());
}
catch (Exception e)
{
System.out.prin tln("Error: " + e);
}
try
{
source = new IFSFileInputStr eam(system,
sourceName,
IFSFileInputStr eam.SHARE_NONE) ;
int available = source.availabl e();
IFSKey key = source.lock(8);
byte[] data = new byte[8];
int bytesRead = source.read(dat a, 0, 8);
System.out.prin tln(bytesRead);
}
catch (Exception e)
{
System.out.prin tln("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.FileNot FoundException: /OTOL/YSREEL
can anyone help me?
public static void main(String[] args)
{
String sourceName = "/OTOL/YSREEL";
IFSFileInputStr eam source = null;
AS400 system = new AS400("M320","m yuserid","mypas sword");
try
{
system.connectS ervice(AS400.FI LE);
System.out.prin tln(system.getV ersion());
}
catch (Exception e)
{
System.out.prin tln("Error: " + e);
}
try
{
source = new IFSFileInputStr eam(system,
sourceName,
IFSFileInputStr eam.SHARE_NONE) ;
int available = source.availabl e();
IFSKey key = source.lock(8);
byte[] data = new byte[8];
int bytesRead = source.read(dat a, 0, 8);
System.out.prin tln(bytesRead);
}
catch (Exception e)
{
System.out.prin tln("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.FileNot FoundException: /OTOL/YSREEL
can anyone help me?