COBOL source is created by precompiling the embedded SQL in COBOL source file with the ecobpg command. Compile the COBOL source with a COBOL compiler.
ecobpg testproc.pco
Point
COBOL source with the extension .cob is created by precompiling source with the extension .pco.
Specify the following options when compiling a COBOL application output with precompiling.
Linux
Include file and library path
Architecture | Option | How to specify the option |
---|---|---|
32-bit | Path of the include file | -I/opt/symfoclient32/include |
Path of the library | -L/opt/symfoclient32/lib | |
64-bit | Path of the include file | -I/opt/symfoclient64/include |
Path of the library | -L/opt/symfoclient64/lib |
COBOL Library
Type of library | Library name |
---|---|
Dynamic library | libecpg.so |
Static library | libecpg.a |
Example
This provides examples of compiling an application dynamically linking with the COBOL library.
Linux 64-bit
cobol -M -o testproc -I/opt/symfoclient64/include -L/opt/symfoclient64/lib -lecpg testproc.cob
Linux 32-bit
cobol -M -o testproc -I/opt/symfoclient32/include -L/opt/symfoclient32/lib -lecpg testproc.cob
Windows
Include file and library path
Architecture | Option | How to specify the option |
---|---|---|
32-bit | Path of the include file |
|
Path of the library |
| |
64-bit | Path of the include file | %ProgramFiles%\Fujitsu\symfoclient64\include |
Path of the library | %ProgramFiles%\Fujitsu\symfoclient64\lib |
COBOL Library
Type of library | Library name |
---|---|
Library for links | libecpg.lib |
Dynamic library | libecpg.dll |
Example
This is an example of compiling on a 64-bit operating system.
64-bit application
> SET LIB=%ProgramFiles%\Fujitsu\symfoclient64\lib;%LIB% > SET INCLUDE=%ProgramFiles%\Fujitsu\symfoclient64\include;%INCLUDE% > cobol -I "%ProgramFiles%\Fujitsu\symfoclient64\include" -M testproc.cob > link testproc.obj F4AGCIMP.LIB LIBCMT.LIB LIBECPG.LIB /OUT:testproc.exe
32-bit application
> SET LIB=%ProgramFiles(x86)%\Fujitsu\symfoclient32\lib;%LIB% > SET INCLUDE=%ProgramFiles(x86)%\Fujitsu\symfoclient32\include;%INCLUDE% > cobol32 -I "%ProgramFiles(x86)%\Fujitsu\symfoclient32\include" -M testproc.cob > link testproc.obj LIBC.LIB F3BICIMP.LIB LIBECPG.LIB /OUT:testproc.exe