Called Programs and Dependencies

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:

  1. Create a project that contains the programs that are called.
  2. In the project properties, expand Micro Focus > Build Configurations and click COBOL.
  3. In Target Settings, select Single Native Library File.
  4. Set the Output Path to the subfolder where the main application executable is output.
  5. 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.
  6. Click Apply and Close.
  7. Build the project.

To set the COBPATH environment variable

Add the COBPATH environment variable to the run-time configuration, as follows:

  1. In the properties of the calling application project, expand Micro Focus > Run-time Configuration > Environment Variables.
  2. Click Add to add the COBPATH variable and specify the full path to your called files.