Skip to main content

Hello,

I also need to call COBOL programs from C# on MicroFocus environment.

I have checked the C# Winbook example and my solution based on it worked perfectly.

But I have a lot of already existing COBOL code, which is in form of "Managed Mainframe Subsytem Application" instead of "Class Library" Project with preference to compile into Multiple Assemblies, and I have encountered multiple problems with calling this COBOL code from C# in a way presented in example mentioned before.

1. Referencing a project is not helpful, because each COBOL file in project creates its own assembly.
I solved it with referencing directly DLLs created from COBOL sources.


2. ilsmartlinkage appears to not work in this type of COBOL project (despite enabling this option in project preferences). Thus, classes representing parameters defined in linkage sections are either not generated at all or not available in my C# project.
Any help in solving this issue would be appreciated.

Best Regards

Hello,

I also need to call COBOL programs from C# on MicroFocus environment.

I have checked the C# Winbook example and my solution based on it worked perfectly.

But I have a lot of already existing COBOL code, which is in form of "Managed Mainframe Subsytem Application" instead of "Class Library" Project with preference to compile into Multiple Assemblies, and I have encountered multiple problems with calling this COBOL code from C# in a way presented in example mentioned before.

1. Referencing a project is not helpful, because each COBOL file in project creates its own assembly.
I solved it with referencing directly DLLs created from COBOL sources.


2. ilsmartlinkage appears to not work in this type of COBOL project (despite enabling this option in project preferences). Thus, classes representing parameters defined in linkage sections are either not generated at all or not available in my C# project.
Any help in solving this issue would be appreciated.

Best Regards

What product and version are you using? If you are using Managed Mainframe Subsystem Application templates then I assume you are using Enterprise Developer and not Visual COBOL is that correct?


Hello,

I also need to call COBOL programs from C# on MicroFocus environment.

I have checked the C# Winbook example and my solution based on it worked perfectly.

But I have a lot of already existing COBOL code, which is in form of "Managed Mainframe Subsytem Application" instead of "Class Library" Project with preference to compile into Multiple Assemblies, and I have encountered multiple problems with calling this COBOL code from C# in a way presented in example mentioned before.

1. Referencing a project is not helpful, because each COBOL file in project creates its own assembly.
I solved it with referencing directly DLLs created from COBOL sources.


2. ilsmartlinkage appears to not work in this type of COBOL project (despite enabling this option in project preferences). Thus, classes representing parameters defined in linkage sections are either not generated at all or not available in my C# project.
Any help in solving this issue would be appreciated.

Best Regards

Why are you compiling the programs as Managed Mainframe Subsystem Applications? That project type is for applications running under Enterprise Server for .NET, using CICS or JCL emulation. Are these CICS or JCL batch programs?