Commodore
Commodore
990 views

Setting Environment Variables used within the IDE

Jump to solution

In Net Express we would load all application-specific environment variables into one of an application's projects (Project Properties>IDE), export to a .gcf file, and then import the .gcf into all other or new projects that were part of the application.

I've found where one can manually enter environment variables for use by a project within the IDE, but no way to export/import them to another project within the same solution.  Is this even possible in VCVS?

Is there a way of setting up solution-wide environment variables?

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

There is currently no way to set solution-wide environment variables as these are set on a project basis.

We have added the NX config file capability beginning with 2.2 update 2 I believe.

If you right-click on a native project and select Add-New Item and then select application config file it will add a file named Application.config to your project. If you right-click on this file and select Edit it will allow you to enter environment variables, COBOL switches and RTS tunables. When you build your application it will copy this file to your output folder as <project-name>.mfgcf. When you start your application this file will be read and the options will be picked up accordingly.

It is possible to add this same Application.config file to your other projects by using Add->Existing item and then navigate to this file and select it. When it is built in the new project it will have the name of the new project with extension mfgcf.

Thanks.

View solution in original post

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

There is currently no way to set solution-wide environment variables as these are set on a project basis.

We have added the NX config file capability beginning with 2.2 update 2 I believe.

If you right-click on a native project and select Add-New Item and then select application config file it will add a file named Application.config to your project. If you right-click on this file and select Edit it will allow you to enter environment variables, COBOL switches and RTS tunables. When you build your application it will copy this file to your output folder as <project-name>.mfgcf. When you start your application this file will be read and the options will be picked up accordingly.

It is possible to add this same Application.config file to your other projects by using Add->Existing item and then navigate to this file and select it. When it is built in the new project it will have the name of the new project with extension mfgcf.

Thanks.

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.