Soeren Kemmann Absent Member.
Absent Member.
1696 views

COBOL source format

Jump to solution

Hello,

is it possible to adjust the source format for COBOL e.g. from fixed (i guess is default) to variable?


Thank you in advance

Kind regards

Alexander

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Contributor
Micro Focus Contributor

RE: COBOL source format

Jump to solution

The legacy.xml file allows you tailor how Enterprise Analyzer (EA) or Modernization Workbench (MWB) processes your source modules. The legacy.xml file can either reside at the workspace level (appears under the main workspace directory) or at the installation wide level copy of the legacy.xml that resides in the <production installation dir>/data directory.

It is recommended that you take a copy of the legacy.xml from the data directory, remove the sections that are not applicable and store it at the workspace level. With any of the configuration files, the workspace version will override the installation level version. Also, when updates are applied, the installation level version can be overwritten, so any changes that you make to that file can be lost.

Within the legacy.xml file, you can alter where the COBOL margins start and end. Below is how to configure the standard COBOL margins.

     <Preprocessor>

       <IndicatorArea>  6 </IndicatorArea>

       <AreaAStart>     7 </AreaAStart>

       <AreaAEnd>       10 </AreaAEnd>

       <AreaBStart>     11 </AreaBStart>

       <AreaBEnd>     71 </AreaBEnd>

     </Preprocessor>

This entry has to be added to one of the COBOL dialects (eg ACU) inside the Cobol tag within the legacy.xml.

I have attached a version of a workspace legacy.xml, Reset_5F00_Cobol_5F00_Margins_5F00_Legacy.xml (the attached file needs to be renamed back to legacy.xml before you can use it) that has been modified to match the free format source format that is supported by the ACU Cobol compiler. For this to work correctly, you must use 3.4 Hot Fix 6 (or later, RPI is 1089865) as there was a bug with the product when the indicator area was set to the same value as Area A Start.

Note: Changes to the margins will be read at the time that you register and verify the code. The changes to the margins made in the legacy.xml are not used by the editor within the MWB or EA products. The margins count starts from zero rather than 1.

Adrian Bean
Support Engineer, EMEA SupportLine

Micro Focus

0 Likes
1 Reply
Highlighted
Micro Focus Contributor
Micro Focus Contributor

RE: COBOL source format

Jump to solution

The legacy.xml file allows you tailor how Enterprise Analyzer (EA) or Modernization Workbench (MWB) processes your source modules. The legacy.xml file can either reside at the workspace level (appears under the main workspace directory) or at the installation wide level copy of the legacy.xml that resides in the <production installation dir>/data directory.

It is recommended that you take a copy of the legacy.xml from the data directory, remove the sections that are not applicable and store it at the workspace level. With any of the configuration files, the workspace version will override the installation level version. Also, when updates are applied, the installation level version can be overwritten, so any changes that you make to that file can be lost.

Within the legacy.xml file, you can alter where the COBOL margins start and end. Below is how to configure the standard COBOL margins.

     <Preprocessor>

       <IndicatorArea>  6 </IndicatorArea>

       <AreaAStart>     7 </AreaAStart>

       <AreaAEnd>       10 </AreaAEnd>

       <AreaBStart>     11 </AreaBStart>

       <AreaBEnd>     71 </AreaBEnd>

     </Preprocessor>

This entry has to be added to one of the COBOL dialects (eg ACU) inside the Cobol tag within the legacy.xml.

I have attached a version of a workspace legacy.xml, Reset_5F00_Cobol_5F00_Margins_5F00_Legacy.xml (the attached file needs to be renamed back to legacy.xml before you can use it) that has been modified to match the free format source format that is supported by the ACU Cobol compiler. For this to work correctly, you must use 3.4 Hot Fix 6 (or later, RPI is 1089865) as there was a bug with the product when the indicator area was set to the same value as Area A Start.

Note: Changes to the margins will be read at the time that you register and verify the code. The changes to the margins made in the legacy.xml are not used by the editor within the MWB or EA products. The margins count starts from zero rather than 1.

Adrian Bean
Support Engineer, EMEA SupportLine

Micro Focus

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.