Trying to compile a very old program in Visual Cobol

[Migrated content. Thread originally posted on 09 December 2011]


I am trying to compile an old cobol program using the Visual studio trial software I downloaded from this site. Before when compiling our microfocus cobol programs we would ge through dos and use a series of commands. When I try to compile them with Visual, I am getting the following error:

COBCH0012 : Operand SQLERRMC is not declared J:\sfbpcob\test469.cob 2272 48 sfbpcob
COBCH0801 : Required DB software: 'db2agapi' could not be found.This error prevents SQL processing from continuing - further EXEC SQL statements will be ignored. 1 1 sfbpcob

Sorry about this, I am sure it is straight forward but I am stuck.
  • Verified Answer

    The program is using the DB2 External Compiler Module but it cannot find that the DB2 Development product is installed. (perhaps it is not in the PATH)

    DB2 support through the ECM is only provided for native applications.

    Please see the following documentation for how to set this up in Visual COBOL:

    Visual COBOL compiling DB2 ECM programs