At run time, called programs are found in the same way as before. However, there are some new ways to set COBPATH and copy files into a common folder.
To build the called programs
You can build your called programs into your application executable, in which case the called programs are found without any further configuration.
When you build the called programs into a .dll file, you can set a property to store the built .dll files in the same folder as the application executable, provided the application project is in the same solution. To do this:
- In the same solution as your main application project, create a project for the called programs.
- In the project's properties, on the Application page, set the
Output type to
Link Library (which represents a Dynamic Link Library (.dll)).
- On the COBOL page, set the
Output path to the same location as that for the built application .exe file.
- If you want to debug the .dll file together with the application, on the Debug page, set the
Working directory to point to the folder containing the built .dll file.
- Build the project.
To set the COBPATH environment variable
Add the COBPATH environment variable to the application configuration file as follows:
- Right-click your main project and click
.
- Double-click
Application.config in Solution Explorer.
- In the
Name field, specify COBPATH.
- In the
Value field, specify the full path of the folder. For example:
\users\myPath\
- Click
Set.