JCL what is wrong with this?

时间:2015-12-10 01:53:47

标签: mainframe jcl

I am trying to crack this JCL and wonder what is wrong.

This is my code :

 000001 //SORTJCL   JOB                                        
 000002 //SORTSTEP  EXEC PGM=SORT                              
 000003 //SYSOUT    DD SYSOUT=*                                
 000004 //SORTOUT   DD SYSOUT=*                                
 000005 //SORTWK01  DD SPACE=(CYL,(1,1))                       
 000006 //SORTIN    DD DISP=SHR,DSN=Y2015.PUBLIC.DATA(AREACODE)
 000007 //SYSIN     DD *                                       
 000008   SORT FIELDS=(6,10,CH,A)                              
 000009 //  IF RC = 0 THEN                                     
 000010 //COPYSTEP  EXEC PGM=ICEGENER                          
 000011 //SYSUT1    DD DISP=SHR,DSN=Y2015.PUBLIC.DATA($005)    
 000012 //SYSUT2    DD DISP=SHR,DSN=&SYSUID..P2.OUTPUT($005)   
 000013 //SYSOUT    DD SYSOUT=*                                
 000014 //SYSPRINT  DD SYSOUT=*                                
 000015 //SYSIN     DD DUMMY                                   
 000016 //  ELSE                                               
 000017 //  ENDIF             

The purpose of this code - to read and sort Y2015.PUBLIC.DATA(AREACODE) and copy and write the output into MYID.P2.OUTPUT($005)

Can anyone explain to me what am I missing?

1 个答案:

答案 0 :(得分:2)

要对" 进行阅读和排序Y2015.PUBLIC.DATA(AREACODE) ",您已经使用了正确的 public JFrame init() { JFrame frame = new JFrame("Pagination"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final JEditorPane editor = new JEditorPane(); editor.setEditorKit(this); editor.addCaretListener(new CaretListener() { public void caretUpdate(CaretEvent e) { if (!isPageBreakInsertion ) { ( (StyledEditorKit) editor.getEditorKit()).getInputAttributes().removeAttribute(PAGE_BREAK_ATTR_NAME); } } }); JMenu fontMenu = new JMenu("Font Size"); for (int i = 48; i >= 8; i -= 10) { JMenuItem menuItem = new JMenuItem("" + i); // add an action menuItem .addActionListener(new StyledEditorKit.FontSizeAction( "myaction-" + i, i)); fontMenu.add(menuItem); } JMenuBar menuBar = new JMenuBar(); menuBar.add(fontMenu); frame.setJMenuBar(menuBar); this.setHeader(createHeader()); this.setFooter(createFooter()); PageFormat pf = new PageFormat(); pf.setPaper(new Paper()); final PaginationPrinter pp = new PaginationPrinter(pf, editor); JScrollPane scroll = new JScrollPane(editor); frame.getContentPane().add(scroll); JToolBar tb=new JToolBar(); JButton bPrint = new JButton("Print to default printer"); bPrint.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { print(editor, pp); } }); JButton bInsertPageBreak = new JButton("Insert page break"); bInsertPageBreak.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertPageBreak(editor); } }); File file = new File("uuu.txt"); try { editor.setPage(file.toURI().toURL()); } catch (MalformedURLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } StyledDocument doc = (StyledDocument) editor.getDocument(); // Create a style object and then set the style attributes Style style = doc.addStyle("StyleName", null); StyleConstants.setFontSize(style, 30); tb.add(bPrint); tb.add(bInsertPageBreak); frame.getContentPane().add(tb, BorderLayout.NORTH); frame.setBounds(new Rectangle(0, 23, 665, 789)); return frame; } 第一个jobstep,在行000006中。读取和排序的结果写入StyledEditorKit,在JCL中似乎写入final JEditorPane editor = new JEditorPane(); editor.setEditorKit(this); (假脱机),在000003行。

但那不是你应该做的(根据你的" 复制并将输出写入MYID.P2.OUTPUT($ 005) &#34)。因此,您必须像这样修改该行000003:

//SORTIN

应用此更改后,您还必须删除与第二个jobstep相关的所有内容(因此从第000009行开始以及该行后面的所有内容)。

如果由于某种原因你仍然希望所有这些行继续包含在这个JCL中,只需在000009行前面插入一个新行,如下所示:

//SORTOUT

这将导致其后的所有剩余JCL行被忽略。