Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Is it possible to have mixed format Cobol programs in a workspace?

Is it possible to have mixed format Cobol programs in a workspace?



With some versions of Cobol, particularly ACU Cobol, it is possible to have a program where area A starts in column 1 and copybooks where area A starts in column 8. Can these source files be loaded into EA?


It is possible to have mixed format source files and copybooks. A single program or copybook must be in only one format, ie area A starts in column 1 or in column 8. A single file cannot have a mixed layout.

What is possible is that a program can be in one format and the copybooks that it uses in another format. An example of this is the standard ACU demo of WinHelp.cbl and the winhelp.def copybook.

From Enterprise Analyzer (EA) 3.4 Hot Fix 8 and EA 3.5 Hot Fix 2 there is now a new workspace option for the ACU Cobol dialect called "Attempts to Resolve Mixed Formatting Styles..” (see screenshot attached). This needs to be selected as by default is it turned off.

When using source files that start in column 1, then the workspace needs to be configured to allow this. For more information on how to configure this support see Can I change the Cobol source format within EA?

With both the new option selected and the legacy.xml changes in place, the following now will happen:

The starting positions will be adjusted according to the first line of each file automatically. While the length of Area A and Area B will be calculated according to the legacy.xml (e.g. Area B End – Area B Start = 129).

If there is not a legacy.xml, and the new option is used, the starting positions will be adjusted automatically as before. However, the lengths of each area will be the default ones for ACU Cobol, or Area A = 4 and Area B = 61.

Note: If the first line does not represent the correct formatting style of the particular file the margins will not be set correctly and errors could occur. These errors can include processing comment lines as though they were source files, processing source lines incorrectly etc.


Screenshot of new workspace option


Incident #2664282



Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2014-03-12 14:32
Updated by:
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.