You are going to explore some of the COBOL editing features using the ZBNKPRT1.cbl program which produces a report from a sequential data file.
This opens the file in the COBOL editor in Eclipse.
The COBOL Copy View is read-only and you cannot edit the code in it. The screen background changes from white to pale yellow.
This opens the copybook file in a new tab in the editor.
Use the Copybook Dependency view to show where in the source file's structure the COPY statements appear, and which copybooks they reference. If the Copybook Dependency view is not displayed in the Team Developer perspective, to open this view click Window > Show View > Other > Micro Focus > Copybook Dependency.
Click a copybook reference in the Copybook Dependency view to locate the associated COPY statement at the appropriate line in the source code.
This opens a pop-up with the outline of the program similar to what the Outline view shows.
) for the Outline to toggle between a physical or alphabetical sequence.
This turns the data items and the paragraph names you hover over into hyperlinks.
) in the toolbar lets you see another view of the program showing the copybooks.
This opens a new toolbar in the editor with the name of your COBOL program.
to enable
Toggle Block Selection Mode and select square blocks of text. When a selection is made, you can cut or copy it.
A pop-up is displayed prompting you to enter a new name for the variable.
This opens the Rename COBOL Element dialog box that enables you to preview and approve
You can change your Eclipse preferences and rename without the Rename COBOL Element dialog box. To do this, go to Window > Preferences > Micro Focus > COBOL > Editor and uncheck Rename in editor without dialog.
MOVE W TO
Notice how the words you type change in the editor. Once a word is recognized as a reserved word or a data item, its color changes. If a line of code contains invalid COBOL syntax, a red cross appears to the left of the line and the word is underlined with a wavy red line.
Also, Content Assist automatically displays a pop-up with suggested keywords and names of data items appears as you type.
MOVE 34 TO WS-
If the IDE preferences for auto-activation of Content Assist have not been changed, Content Assist opens a list of potential data names that start with WS- to choose from. If Content Assist does not display a list, to open it manually click Ctrl+Space.
You can now remove the line numbers from your code:
in the Eclipse toolbar).
This removed the line numbers from the COBOL sequence area.
To reinsert the line numbers in your code:
in the Eclipse toolbar).
To insert line numbers beyond the end of area B:
You should now see line numbers running down both sides of the source code:
The editor supports background parsing, syntax checking, content assist and an outline view like the COBOL Editor does.
There are two ways to edit BMS files. The first one is to use the basic BMS text editor available in the IDE. The other is to use a WYSIWYG version, the Micro Focus BMS Painter, which is available as a separate utility installed with this product.
To open the BMS file in the IDE text view:
Although you can use this basic text editor to make small changes, it is quite difficult to edit BMS files in text view.
A much more suitable and less error-prone way to edit BMS files is to use the BMS Painter.
This starts the external Micro Focus BMS Painter.
For example, double-click the data field immediately following the text “User Id” and move it to a different position on the map.
For example, do this for the MBANK10 mapset and the BANK10A map.
You can edit data files using one of two available Micro Focus Data File Editor tools the Classic Data File Tools which was available with Net Express and a newer one, called Data File Tools.
Close the utility now as we are going to use the new one for this demonstration.
To use the new editor:
This starts the Data File Editor and loads the .dat file in the Open Data File dialog box.
,
Edit Record.
This highlights the record.
,
Save Record.