Displaying and Editing COBOL Code from the Mainframe

Within the Team Developer perspective you can now use the full editing capabilities within the Enterprise Developer for z Systems Eclipse IDE to edit mainframe source files.
  1. In the Application Explorer view, right-click the ZBNKPRT1 member and choose Edit. The MVS ZBNKPRT1 member is opened in the editor.

    GUID-7D735A6E-6A60-40C2-A83B-DD38B5618DDB-low.png

    When the file is opened in the editor, the following occurs:
    • The file is locked for editing on the mainframe.
    • A background parse is performed (even though the member and its dependent files, such as copybooks, physically reside on the mainframe).

    The background parsing is exactly the same as the functionality demonstrated in the Editing Source Files tutorial (of the Getting Started... tutorial set), which means that a number of editor features are enabled to assist with programmer productivity, including:

    • Content Assist - editing features to help you write syntactically correct procedural code and to look up working storage data names.
    • Outline view - you can see the structure of the program that you are editing, which is useful for navigating large programs; for example, click an item in the Data Division section to jump to that item in the editor.

      GUID-AEF11290-3F8C-4A3F-807B-242A6AF39B45-low.png

    • Breadcrumbs - breadcrumbs enable you to view copybooks in the context of the program in which they are referenced. When you view or edit a copybook, you need to see it in the context of the program that references it, because its appearance and usage can change depending on the program. Data items that are not used in the program are struck through, and horizontal lines indicating the start and end of code lines are shown depending on the source format of the program.

      When focus is on a copybook, the Eclipse window's title bar shows the location of the file and the program currently associated with it.

      A trail at the top of the editor indicates which program and copybooks are currently in context - click GUID-78966D2A-BEB4-4D47-AA05-ADAF9859C3C0-low.png (Toggle Context Breadcrumbs) on the Eclipse toolbar and use the drop-down list to view and open the dependent copybooks.

  2. Within this edit session, use the knowledge gained during the earlier tutorials to explore and edit this COBOL program.

    The tools available are the same whether you are editing source locally or on the host.

    Remember that you are editing a program that resides on the mainframe, and so your changes may affect other users.