I am calling as400 system from Java. I am able to connect to a program of as400 system but not able to get the output data. It is giving me empty message.
AS400 as400 = new AS400("as242g.na.sysco.net", "dprint", "dprint");
System.out.println(as400);
ProgramParameter[] parameters=new ProgramParameter[4];
AS400Text opcoText=new AS400Text(3,as400);
AS400Text emoptyText=new AS400Text(1,as400);
AS400Text indicatorText=new AS400Text(1,as400);
parameters[0]=new ProgramParameter(opcoText.toBytes("056"));
parameters[1]=new ProgramParameter(emoptyText.toBytes(" "));
parameters[2]=new ProgramParameter(indicatorText.toBytes("Y"));
parameters[3] = new ProgramParameter(10);
String fullProgramName = "/QSYS.LIB/SCSUINT.LIB/DPIM10CL.PGM";
System.out.println(fullProgramName);
ProgramCall programCall=new ProgramCall(as400);
try {
programCall.setProgram(fullProgramName,parameters);
if (programCall.run()) {
System.out.println("run");
AS400Text text1 = new AS400Text(10,as400);
String message=(String) text1.toObject(parameters[3].getOutputData());
System.out.println(message);
}
else {
System.out.println("false");
}
} catch (PropertyVetoException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (AS400SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ErrorCompletingRequestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ObjectDoesNotExistException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Could someone please help what changes need to be done to get the desired output result