Calling COBOL Programs from C

Linking

  • When using COBOL and C object code together, Micro Focus recommends you build and keep the COBOL and C executables separate, and use import libraries and the Micro Focus C functions for calling COBOL (see "C functions for calling COBOL" in the product help) to resolve calls between them.

Calling

  • The cobcall function does not locate statically-linked COBOL programs on Windows platforms.
  • You cannot call COBOL programs containing COMP-1 or COMP-2 parameters specified BY VALUE. Conversely, you cannot call a C program using a COBOL program containing COMP-1 or COMP-2 parameters specified BY VALUE.