Read AS400 Spooled File with All pages - JAVA (JT400)

I'm Trying to read AS400 Spooled file in JAVA. I read it using this code. but problem is it's retrieve only one page details of that Spooled file. But i want to read and get all pages details. Any one know how to do it ? Thanks in Advance! CODE : try { jTextArea1.setText(null); DefaultTableModel DTM =(DefaultTableModel) jTable1.getModel(); int SR = jTable1.getSelectedRow(); String SPLFNAME = (String) DTM.getValueAt(SR, 0); String SPLFNUMBERT = (String) DTM.getValueAt(SR, 1); String JOBNAME = (String) DTM.getValueAt(SR, 3); String JOBUSER = (String) DTM.getValueAt(SR, 4); String JOBFNUMBER = (String) DTM.getValueAt(SR, 5); int SPLNO = Integer.parseInt(SPLFNUMBERT); AS400 sys = new AS400(); SpooledFile sf = new SpooledFile( sys, // AS400 SPLFNAME, // splf name SPLNO, // splf number JOBNAME, // job name JOBUSER, // job user JOBFNUMBER ); // job number PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // Create a page input stream from the spooled file PrintObjectPageInputStream is = sf.getPageInputStream(printParms); BufferedReader d = new BufferedReader(new InputStreamReader(is)); String data =""; while((data = d.readLine() )!=null) { System.out.println (data); jTextArea1.setText(jTextArea1.getText()+"\n"+data); } } catch (Exception e) { System.out.println(e); }

以上就是Read AS400 Spooled File with All pages - JAVA (JT400)的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准