New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Commodore
Commodore
857 views

Expanding & collapsing COBOL code with little + and - signs ???

Jump to solution

Completely by accident, I see that it's <theoretically> possible to expand and collapse portions of COBOL source code.  Just thrashing around, I somehow managed to create little + and - signs next to the line number, just before column 1, and that clicking them causes code sections to appear and disappear.  My problem is that I can't find documentation about how to create, delete, and generally manage the expand / collapse function.  I would be most grateful to be pointed in the right direction.

My Micro Focus product specs are as follows.

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.6.01586 SP1Rel

Installed Version: IDE Standard

Microsoft Visual Web Developer 2010 01011-532-2002361-70367
Microsoft Visual Web Developer 2010

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert
The specs that you posted are for the Microsoft Visual Studio product version and not the Micro Focus Visual COBOL version. Since we have not had support for Visual Studio 2010 in a couple versions I am assuming that you are not on the latest release.

The expandable sections of code that you reference are known as regions in Visual Studio. They are part of the Outlining feature. If you look up Outlining in the Visual Studio docs you will find information on how to turn this on and off. Normally you can right-click in the edit window and select the Outlining menu option.

Depending on the product release you are using the support for regions may differ. By default regions are created automatically for the various sections of a COBOL program so that for example you can close the working-storage section while you are working in the procedure division. For each section or paragraph within the procedure division a region will also be created. Starting with V2.3 the $REGION statement is supported allowing you to define your own regions using $REGION - $END-REGION to surround blocks of code that you want to folded or expand in the editor.
In the next release, 3.0 each 01 level in the data division will also be setup as an expandable region.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert
The specs that you posted are for the Microsoft Visual Studio product version and not the Micro Focus Visual COBOL version. Since we have not had support for Visual Studio 2010 in a couple versions I am assuming that you are not on the latest release.

The expandable sections of code that you reference are known as regions in Visual Studio. They are part of the Outlining feature. If you look up Outlining in the Visual Studio docs you will find information on how to turn this on and off. Normally you can right-click in the edit window and select the Outlining menu option.

Depending on the product release you are using the support for regions may differ. By default regions are created automatically for the various sections of a COBOL program so that for example you can close the working-storage section while you are working in the procedure division. For each section or paragraph within the procedure division a region will also be created. Starting with V2.3 the $REGION statement is supported allowing you to define your own regions using $REGION - $END-REGION to surround blocks of code that you want to folded or expand in the editor.
In the next release, 3.0 each 01 level in the data division will also be setup as an expandable region.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.