3. Embedded SQL for COBOL : Preprocessor Operation : The COBOL Compiler—Windows and UNIX
 
Share this page                  
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 the COBOL Data Items and Data Types (see page COBOL Data Items and Data Types) section in this chapter, 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 (see page 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.