Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/373.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取java中用户的SpooleFileList,以及我们可以在as400中执行的所有操作(如查看、更改等)_Java_Ibm Midrange - Fatal编程技术网

获取java中用户的SpooleFileList,以及我们可以在as400中执行的所有操作(如查看、更改等)

获取java中用户的SpooleFileList,以及我们可以在as400中执行的所有操作(如查看、更改等),java,ibm-midrange,Java,Ibm Midrange,我想要以下格式的输出,我们在执行WRKSPLF时在as400中得到 我使用以下代码从as400检索信息 try { AS400 as400System = new AS400(); String strSpooledFileName; SpooledFileList splfList = new SpooledFileList(as400System);

我想要以下格式的输出,我们在执行WRKSPLF时在as400中得到

我使用以下代码从as400检索信息

         try
            {
                AS400 as400System = new AS400();
                String strSpooledFileName;

                SpooledFileList splfList = new SpooledFileList(as400System);

                splfList.openAsynchronously();

                splfList.waitForListToComplete();

                Enumeration enume= splfList.getObjects();
                ArrayList<SpoolVO> list = new ArrayList<SpoolVO>();

                while( enume.hasMoreElements() )
                {
                    SpoolVO splVO = new SpoolVO();
                    SpooledFile splf = (SpooledFile)enume.nextElement();
                    if (splf != null)
                    {
                        // output this spooled file's name
                        splVO.setFileName(splf.getStringAttribute(SpooledFile.ATTR_SPOOLFILE));
                        splVO.setUserName(splf.getStringAttribute(SpooledFile.ATTR_JOBUSER));
                        splVO.setUserData(splf.getStringAttribute(SpooledFile.ATTR_USERDATA));
                        splVO.setDevice(splf.getStringAttribute(SpooledFile.ATTR_OUTPUT_QUEUE));
                        splVO.setTotalPages(splf.getIntegerAttribute(SpooledFile.ATTR_PAGES));
                        splVO.setCurrentPage(splf.getIntegerAttribute(SpooledFile.ATTR_CURPAGE));
                        splVO.setCopy(splf.getIntegerAttribute(SpooledFile.ATTR_COPIES));

                        list.add(splVO);
                    }
                }
          splfList.close();
试试看
{
AS400 AS400系统=新AS400();
字符串strSpooledFileName;
SpooledFileList splfList=新的SpooledFileList(as400System);
splfList.openAsynchronously();
splfList.waitForListToComplete();
枚举枚举=splfList.getObjects();
ArrayList=新建ArrayList();
while(enume.hasMoreElements())
{
SpoolVO splVO=新的SpoolVO();
SpooledFile splf=(SpooledFile)enume.nextElement();
如果(splf!=null)
{
//输出此假脱机文件的名称
setFileName(splf.getStringAttribute(SpooledFile.ATTR_SPOOLFILE));
setUserName(splf.getStringAttribute(SpooledFile.ATTR_JOBUSER));
setUserData(splf.getStringAttribute(SpooledFile.ATTR_USERDATA));
setDevice(splf.getStringAttribute(SpooledFile.ATTR_输出_队列));
setTotalPages(splf.getIntegerAttribute(SpooledFile.ATTR_PAGES));
splVO.setCurrentPage(splf.getIntegerAttribute(SpooledFile.ATTR_CURPAGE));
setCopy(splf.getIntegerAttribute(SpooledFile.ATTR_COPIES));
添加列表(splVO);
}
}
splfList.close();
现在,通过使用上面的代码,我可以得到除Options(Opt)之外的所有字段。我想要java中的Options字段,它使我能够执行屏幕截图中指定的所有操作,如发送、更改、保留等

这是否可能在java中实现


提前感谢。

猜测您正在使用您将使用并获得您想要的详细信息。编辑您的问题以解释您想要检索的具体详细信息。发布您尝试的代码

编辑:


选项字段不是假脱机文件的属性;您无法从任何位置检索它。它是显示面板上的一个字段,允许用户请求WRKSPLF命令执行的操作。您需要在Java程序中提供该功能。例如,如果您的最终用户键入a 3,您将发出HLDSPLF命令。如果她键入6,您将发出RLSSPLF命令。

如何?好吧,您开始编写执行所有选项的Java程序。您的问题一点也不清楚。我已经修改了这个问题。请检查并回答。提前谢谢。