Software AG Products 2.4.1 | Using Adabas Pre-Compiler on Linux | Compiling with the GnuCOBOL Compiler
 
Compiling with the GnuCOBOL Compiler
To compile a program with GnuCOBOL:
1. Create a directory to contain your COBOL code.
2. Copy the ADAGLOB.txt file, which you modified during the installation steps, to this directory.
3. In the COBOL script directory you created, type gadpcomp.sh ./<ScriptName>
This script invokes the GnuCOBOL compiler and produces an executable program in the local directory with the same name as your COBOL script without an extension.
Compilation errors are printed in the console and logged in the ADAMES.txt file, located in the current direcotry.
To execute the compiled program:
1. Specify the Adabas database ID with the SQL_DEFAULT_DBID environment option.
2. Execute the program.
./program