Calling Managed OO COBOL from C#

Hi,

In a nutshell, how can I call managed COBOL from C#. Is there any references I need to add or something ??

 

Best Regards

Parents
  • Verified Answer

    If you are calling a method in a COBOL class from C# then all you need to add is a reference to the COBOL project for the Class library to the C# project.

    If you are trying to call a COBOL procedural program from C# then you need to add a reference to the MicroFocus.COBOL.Runtime assembly to the C# project.

    Open up the Samples browser in Start-->All Programs-->Micro Focus Visual COBOL-->Samples and look at the program called C# Winbook as this is a good example of how to call a managed COBOL procedural program directly from C# which also uses the ilsmartlinkage directive to expose the COBOL linkage section to C#.

    Thanks..

Reply
  • Verified Answer

    If you are calling a method in a COBOL class from C# then all you need to add is a reference to the COBOL project for the Class library to the C# project.

    If you are trying to call a COBOL procedural program from C# then you need to add a reference to the MicroFocus.COBOL.Runtime assembly to the C# project.

    Open up the Samples browser in Start-->All Programs-->Micro Focus Visual COBOL-->Samples and look at the program called C# Winbook as this is a good example of how to call a managed COBOL procedural program directly from C# which also uses the ilsmartlinkage directive to expose the COBOL linkage section to C#.

    Thanks..

Children
No Data