JT400使用没有密码的用户从IFS读取文件 [英] JT400 Read File From IFS with user without password

查看:111
本文介绍了JT400使用没有密码的用户从IFS读取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的问题如下:

我们必须使用JT400连接到ISeries并读取IFS中的文件. 一个要求是作业正在QBatch中运行,并且用户没有密码. 我们的代码如下:

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);

最后一行抛出此异常: com.ibm.as400.access.AS400SecurityException:未设置密码

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

感谢您阅读我们的问题

推荐答案

尝试使用

AS400 as400 = new AS400("localhost","*CURRENT","*CURRENT");

请参见 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆