01) 我试图让 IBM/AS400 Serial no 使用命令调用方法。代码正在运行,因为它没有任何错误或异常。我觉得有些东西不见了。帮我纠正它。
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);