Was this helpful?
The COBOL Compiler--Windows and UNIX
To compile this code, use the cob command. The following example preprocesses and compiles the file test1.
esqlcbl test1.scb
cob test1.cob
When you use the cob command to compile the generated COBOL code, the compiler issues the following informational message:
    01 SQLABC PIC S9(9) USAGE COMP-5 SYNC VALUE 0
**209-I***********************************
**  COMP-5 is machine specific format.
As mentioned in COBOL Data Items and Data Types, COMP‑5 is an Ingres-compatible numeric data type, and a data item of the type is included in the Ingres system COPY file. You can ignore this warning or suppress it by using the cob compiler directive or command line flag:
cob -C warning=1
Also, because the program will be run through the COBOL interpreter that is linked to the Ingres runtime system, do not modify the default values of the COBOL compiler align and ibmcomp directives. To run your embedded SQL/COBOL test program, use the ingrts command (an alias to your Ingres-linked RTS):
ingrts test1
For more information on building and linking the Interpreter (or RTS), see How to Incorporate Ingres into the Micro Focus RTS--UNIX in this chapter.
Note:  For operating system specific information on compiling and linking ESQL/COBOL programs, see the Readme file.
The COBOL Compiler--Windows Micro Focus Net Express
On Windows, use the cobol command to compile the COBOL code generated by the preprocessor. Then use the cblnames command to extract all public symbols into a cbllds.obj file for the linker, and the link utility to bind the objects into an executable.
The following example preprocesses and compiles the file test1:
esqlcbl test1.scb
cobol   test1.cbl  /case  /litlink
cblnames –t  –mtest1  test1.obj
link      /OUT: test1.exe \
          /SUBSYSTEM:CONSOLE \
          /MACHINE:i386 \
          /NOD \
          test1.obj \
          cbllds.obj \
          libingres.lib \
          msvcrt.lib \
          oldnames.lib \
          mfrts32s.lib \
          kernel32.lib \
          user32.lib \
          gdi32.lib \
          advapi32.lib
Last modified date: 11/28/2023