Previous Topic Next topic Print topic


Enhancements for Visual COBOL 2.2 for Visual Studio 2012

The following enhancements are applicable to Visual COBOL for Visual Studio 2012:

Copybook Dependencies

Solution Explorer shows a tree view of the dependencies of the COBOL programs and copybooks on copybooks in a project to help you navigate easily around the source code.

Expanded Copybook View - Technical Preview

The COBOL editor supports showing the contents of copybooks inline at the place where they are referenced in a program or a copybook. Features include:

  • Support for copybooks referenced using any of the following statements - COPY, -INC, ++INCLUDE, EXEC SQL INCLUDE.
  • Support for editing copybooks in the expanded copybook view (except for copybooks shown with replaced values or such for which the user does not have write access).
  • For copybooks referenced using a COPY... REPLACING statement, you can show either the original contents of the copybook file or show its contents with replaced values. The expanded copybook view with replaced values is read-only which is indicated by a yellow background color.
    Note: You can configure the background color of the read-only view from Tools > Options > Environment > Fonts and Colors, and changing the background color for the COBOL Read-Only Background item.
  • Go To Definition, Find All References, navigation using the drop-down types and members, and navigating to an error from the Error List window all find results or locate information in the expanded copybook view.
  • Support for Intellisense and code snippets when editing copybooks in the expanded copybook view.
  • Support for the Visual Studio outlining feature (collapsing and expanding regions of code) within the expanded copybook view and for regions that include expanded copybooks.
Note: The following limitations apply to the expanded copybook view:
  • In expanded copybook view, it is not possible to edit copybooks referenced through a COPY... REPLACING statement when the expanded copybook view shows the replaced values. In this case, the expanded copybook view is read-only.
  • The read-only status of expanded copybooks is not preserved when you close the project. Next time you open the project, the copybook is shown in the Expanded Copybook view but not as read-only.
  • If you used the OF or IN phrases with a COPY statement, it is not possible to show the corresponding copybook in the Expanded Copybook view or open it using the Open "CopybookName" in New Window command if the copybook is stored in a library file (where you have used the COPYLBR Compiler directive).
  • Navigating to items in the expanded copybook view is not supported from the Class View or using the Navigate To command.
  • References to file locations in the output windows such as pointing to the build output, or in the results received by Find in Files, do not point to items in the expanded copybook view.
  • Selecting the currently selected statement in the call stack in an expanded copybook may show the actual copybook. You can use the Show Next Statement command of the debugger to return the actual expanded copybook position.
  • The Breakpoints window always shows the line number of a breakpoint within the file containing it, not the line number within expanded copybook view.
  • The Call Stack, Threads and IntelliTrace windows all display line numbers corresponding to the file containing the statement, not the line number within expanded copybook view.
  • If you move the caret to an invalid position in the expanded copybook view, the Set Next Statement command will display an ‘Unable to set the next statement to this location’ error message and the copybook will be opened as a separate document.
  • When stepping through managed code, if the next statement to step onto is within the same class or program, and on the same line number, but in a different source file, the debugger steps over that statement. For example, if you try to step from line 10 of Program1.cbl to line 10 of Copybook1.cpy, the debugger steps over the statement in the copybook.
Previous Topic Next topic Print topic