|Workgrouping||Navigating Source Code|
The Integrated Development Environment includes full editing capabilities, enabling you to edit your COBOL and Assembler source code (as well as other flat text files). These capabilities include the usual text editing features, such as text entry, cut and paste and others that make working with programs easier.
Follow these links for more information:
You can manipulate copybooks individually so that the only code visible is the code you are interested in.
Bookmarks enable you to keep tags in your source code for future reference.
By compressing the source code, you display only the lines you are interested in and hide all others.
You can select text by dragging the mouse across the source. Dragging can:
When you cut whole lines, the text below the cut lines moves up.
When you paste the cut lines, the lines after the cursor move down to make room for the pasted lines.
When you cut a rectangle of text, the text to the right of the rectangle comes in to the left, but text below does not move up.
When you paste a rectangle, any text to the right moves out to the right to make room. It does not move down.
Note: Even with column selection enabled, you can select whole lines by dragging in the prefix area of the lines you want. You must drag in the prefix area to select whole lines.
If you drag across out of the prefix area into the text area, you select only a rectangle of text. Although this rectangle may include all the text you want, it does not include the whole lines. If you then cut this rectangle, the text is cut but the empty lines remain intact. When you paste the rectangle, it pushes the existing text to the right. It does not push the existing text down onto subsequent lines.
The Insert or Overtype mode does not affect column selection and line selection behavior. The normal behavior inserts the pasted text. However, you can overtype existing text by selecting the text you want to overtype and then pasting the new text on top of it.
Every editing change that you make is added to the undo stack. The undo operation takes the most recently performed operation from the undo stack and unexecutes it. For example, if you deleted a line, the undo operation inserts it again.
You can also undo undo operations, known as redoing. This is useful when you undo more edits than you intended.
Copybooks are an integral part of most COBOL and Assembler programs. Using Mainframe Express, you can select which copybooks you want the editor to display.
Note: There is an option Hide All Copybooks on the View menu which you may want to use if you do not need the automatic display of copybooks. If you use this option, the editor displays a particular file contents only when instructed by debugging or browsing operations. If this option is turned off, the source copybooks are automatically opened and displayed.
A copybook in a program can be in one of three states: shown, hidden or closed.
The editor displays the entire copybook beneath its
When you request Copybook > Show on the File menu, the editor first checks to see if it has information (from the compiler) about the existence of a copy statement at the cursor position. If it does, and that copybook has not already been loaded, the editor opens and displays the file. If the copybook has already been loaded but is just hidden, the editor redisplays the file.
If the program has not been compiled or there is no record of a copybook at that location in the compiler information, the the editor parses the line looking for various copy verbs (depending on the language). If it finds one, it extracts the filename then opens and displays the file.
There is an editor option Lock source files when opening them (Edit > General on the Options menu) which can be on or off:
Note: When loading large files in the source editor, fewer resources are used if you select Lock source files when opening them.
When you select Copybook > Hide on the File menu, the
copybook disappears from the screen. All that is visible of a hidden
copybook is its
COPY statement. Hide performs
different functions, depending on whether or not your program has been
Hide removes the contents of the copybook from view and does not close the copybook file.
By hiding the file and not just closing it, the editor is able to reposition to a line within that file at any time in the future: this might happen as a result of browsing or debugging. If it had closed the file, this knowledge of where the copybook lies in the program is lost and as a result, the editor is not able to reposition within the file as needed.
Hide behaves as if you had requested a Close.
Close performs the following operations:
Supposing that you load a compiled program (when the editor has information about your copybook files). You can either use Show to display your copybook or it is displayed automatically.
If you then use Hide and edit the
to copy a different file, your next Show instruction displays the
original copybook file.
In order to display the new copybook file, you must first close the original copybook, change the copy statement and then display the new copybook using Show.
Bookmarks are a way of enabling you to mark a line in a file so that you can return to it at a later time. Setting a bookmark on a line displays a book icon in that line's prefix area. You can then:
When developing a source program, there are a number of operations that put marks in the prefix area. For example:
If you cannot see these marks, the prefix area may be hidden. To make it visible, right-click in the editing window and click Prefix Area on the popup menu.
As well as moving to the next and previous marked line with a single click, you can also compress the code to show only the marked lines, by clicking.
Compressing a file hides the unmarked code, so that only the marked lines are displayed. If there is more than one type of mark on the program, only the lines marked by the latest operation are shown. The previous marks are not lost but those lines are hidden.
The opposite of compressing lines is expanding them. This returns the display to normal, showing all lines. It keeps the cursor on the marked line it was on when you expanded it.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
|Workgrouping||Navigating Source Code|