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?

  • 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.