问题
our problem is the following:
We have to connect to an ISeries with the JT400 and read a file in the IFS. One requirement is the job is running in the QBatch with a user without password. Our code is the following:
//This wy we connect to the Iseries with the job credentials in this case
//user withou password
AS400 as400 = new AS400();
IFSFile file = new IFSFile(system, path);
//This line throws the AS400SecurityException
IFSFileInputStream fis = new IFSFileInputStream(file,IFSFileInputStream.SHARE_NONE);
The last line throws this exception: com.ibm.as400.access.AS400SecurityException: Password is not set
We searched on internet but couldn´t find anyone with same problem
Thank you for reading our question
回答1:
Try connecting to the host using
AS400 as400 = new AS400("localhost","*CURRENT","*CURRENT");
See http://javadoc.midrange.com/jtopen/com/ibm/as400/access/AS400.html#AS400(java.lang.String,%20java.lang.String,%20java.lang.String)
来源:https://stackoverflow.com/questions/33529107/jt400-read-file-from-ifs-with-user-without-password