01) 我试图使用命令调用方法获取 IBM/AS400 序列号。代码正在运行,因为没有任何错误或异常。我觉得有东西不见了。帮我改正。
02) 有没有办法使用 jt400 (java) 获得 AS/400 序列号。我找到了 getSerialNum()
方法。但 com.ibm.cics.server.CertificateInfo
导入时出现异常。也帮我改正它(如果有人能告诉我如何使用getSerialNum()
方法获取序列号,那对我真的很有帮助)
提前致谢!
我的命令调用代码:
AS400 system = new AS400();
CommandCall command = new CommandCall(system);
try
{
// Run the command "DSPSYSVAL" and parameter value for "SYSVAL" is "QSRLNBR"
if (command.run("DSPSYSVAL QSRLNBR") != true)
{
// Note that there was an error.
System.out.println("Command failed!");
}else{
// Show the messages (returned whether or not there was an error.)
AS400Message[] messagelist = command.getMessageList();
for (int i = 0; i < messagelist.length; ++i)
{
// Show each message.
System.out.println(messagelist[i].getText());
}
}
}
catch (Exception e)
{
System.out.println("Command " + command.getCommand() + " issued an exception!");
e.printStackTrace();
}
// Done with the system.
System.out.println("End!");
system.disconnectService(AS400.COMMAND);
最佳答案
看看 SystemValue类。
关于java - AS/400 命令调用 - JT400 (Java),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19573504/