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
When you build the called programs into a .dll or .so file, you can set a property to output the built file into the same
folder as the main application executable. To do this the called programs and the application main program must be in the
same project. To set this:
- Create a project that contains the programs that are called.
- In the project properties, expand
and click
COBOL.
- In
Target Settings, select
Single Native Library File.
- Set the
Output Path to the subfolder where the main application executable is output.
- If you want to debug the .dll file together with the application, expand
Override COBOL project settings, check
Enable configuration specific settings, and ensure
Compile for debugging is set to
Yes.
- Click
Apply and Close.
- Build the project.
To set the COBPATH environment variable
Add the COBPATH environment variable to the run-time configuration, as follows:
- In the properties of the calling application project, expand
.
- Click
Add to add the COBPATH variable and specify the full path to your called files.