To call managed COBOL in a multiple user environment

  1. If the COBOL to be called is procedural, create a COBOL class library project and add your procedural COBOL to that project.
  2. Create a project for the calling program and add a reference to the:
    • Micro Focus Runtime (Interop RuntimeServices) assembly - this adds the MicroFocus.COBOL.RuntimeServices reference to your project.
    • Micro Focus Runtime assembly - this adds the MicroFocus.COBOL.Runtime reference to your project. You need this only if the calling program is in a .NET language other than COBOL.
    • Project containing the COBOL class library that you want to call.
  3. Write a program that calls the COBOL class within its own run unit. To do this, you create a run unit using the MicroFocus.COBOL.RuntimeServices.RunUnit class. Then you instantiate the COBOL class and invoke this instance within the new run unit.