Highlighted
Absent Member.
Absent Member.
1259 views

Migrating individual cobol files to individual projects in Visual Cobol

Jump to solution

[Migrated content. Thread originally posted on 15 April 2011]

Under Netexpress we generally compiled individual cbl files to gnt from the command line - if we move to Visual Cobol it looks like we would need solution with a separate project for each cbl ? Given that we have thousands of files it would clearly be a very time consuming process to do this manually through the IDE - is there a tool to automate this ?
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Migrating individual cobol files to individual projects in Visual Cobol

Jump to solution

Are you going to move to managed code or native code in Visual COBOL?

The command line tools, cobol and cbllink are still present in Visual COBOL so you should still be able to compile as you did before if you are staying with native code.

If you wish to go to managed code then you can also generate managed assemblies using the cobol.exe command along with the appropriate directives like -ilgen. see .NET Compiler directives.

If you have an existing project or solution then it too can be built from the command line using the msbuild command.

Visual Studio projects will generate .EXE or .DLL format applications only, .GNT is not supported, although you can generate .GNT using the command line.

You might want to rethink the packaging method of these programs.
In Visual Studio, it is more common to have many source programs that are grouped together into a single project which will generate a single assembly.

This is much easier to maintain then having a separate project for each source program resulting in thousand of individual .DLLs.

There is currently no utility for automating this project/solution creation process.

Currently you would need to use the Visual Studio IDE to create the Solution/Project and then import the source into the projects.

If you use the one project contains many source files approach this is a very simple task as there is an option to add existing COBOL items to a project which allows you to specify entire folders and multiple programs at one time.

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Migrating individual cobol files to individual projects in Visual Cobol

Jump to solution

Are you going to move to managed code or native code in Visual COBOL?

The command line tools, cobol and cbllink are still present in Visual COBOL so you should still be able to compile as you did before if you are staying with native code.

If you wish to go to managed code then you can also generate managed assemblies using the cobol.exe command along with the appropriate directives like -ilgen. see .NET Compiler directives.

If you have an existing project or solution then it too can be built from the command line using the msbuild command.

Visual Studio projects will generate .EXE or .DLL format applications only, .GNT is not supported, although you can generate .GNT using the command line.

You might want to rethink the packaging method of these programs.
In Visual Studio, it is more common to have many source programs that are grouped together into a single project which will generate a single assembly.

This is much easier to maintain then having a separate project for each source program resulting in thousand of individual .DLLs.

There is currently no utility for automating this project/solution creation process.

Currently you would need to use the Visual Studio IDE to create the Solution/Project and then import the source into the projects.

If you use the one project contains many source files approach this is a very simple task as there is an option to add existing COBOL items to a project which allows you to specify entire folders and multiple programs at one time.

View solution in original post

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: Migrating individual cobol files to individual projects in Visual Cobol

Jump to solution

This "see .NET Compiler directives" link is broken

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Migrating individual cobol files to individual projects in Visual Cobol

Jump to solution

I have now fixed the link referenced.

Thanks

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.