Compatible Types Example

The InterfacingWithStdCOBOL.sln solution contains six projects. There are three pairs of projects, where each pair comprises a C# client console project and a COBOL project. Each client C# project makes a reference to its corresponding COBOL project so that it can use the implicit or explicit COBOL methods that are exposed. This solution is available under the Samples folder. See Start menu > All Programs > Micro Focus Visual COBOL 2010 > Visual COBOL Samples.

The first pair of projects, StdCbl01.*, shows a COBOL program using types that are compatible with C# types. Although this works, it is a somewhat fictitious example, as COBOL modules usually use other data types and more complex structures that don't correspond to .NET types.

The StdCbl01 projects include the following programs: