Highlighted
Absent Member.
Absent Member.
423 views

Visual Cobol projects in .NET

Is there a way to not include all the programs in the actual project, but instead have a program within the project call other executables (GNTs) in a known directory and just run them?

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Visual Cobol projects in .NET

The title of your post is Visual COBOL projects in .NET which implies that you are using managed .NET code yet your question is about calling .gnt's which are native code. Are you using a managed code project template or a native code project template?

You can set the COBPATH environment variable within your project properties on the Application tab under Environment for a native project type. If you point this to the folder where your .gnts are located it will be searched for a matching program is referenced in a call statement. If you are calling .dlls then you would set the PATH environment t variable instead. You can also add an application.config file to your project and set the environment variables there.

For managed .NET code you should add a project reference to point to the .dll to call or add the ilref directive to your compile.
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.