Configuring the Micro Focus COBOL compiler on AIX

Before you develop Micro Focus COBOL applications that contain embedded SQL and Db2® API calls on AIX® operating systems, you must configure the Micro Focus COBOL compiler.

About this task

Follow the listed steps if you develop applications that contain embedded SQL and Db2 API calls with the Micro Focus COBOL compiler.

Procedure

  • When you precompile your application using the PRECOMPILE command, use the target mfcob option.
  • You must include the Db2 COBOL COPY file directory in the Micro Focus COBOL environment variable COBCPY. The COBCPY environment variable specifies the location of the COPY files. The Db2 COPY files for Micro Focus COBOL are in sqllib/include/cobol_mf under the database instance directory.
    To include the directory, enter:
    • On bash or Korn shell:
      export COBCPY=$COBCPY:$HOME/sqllib/include/cobol_mf
    • On C shell:
      setenv COBCPY $COBCPY:$HOME/sqllib/include/cobol_mf
    Note: You might want to set COBCPY in the .profile or .login file.