You have written a source code file test.cpc.
Use the command cpc –d DB –u Jones,secret test
to generate the file test.o. This uses the database instance DB with the user Jones and the password secret.
Use the command cpclnk test
to link the file with the runtime library and generate an executable program.
If you want a trace file to be written when the test program is executed, set the environment variable SQLOPT to -X. The corresponding command in a Bash shell is as follows:
export SQLOPT=-X
The trace file test.pct is written when the test program is executed. This file is located in the same directory as the test program.
To test the newly installed precompiler, you can use the SAP DB test database at http://www.sapdb.org.
After you install the package (5 KB), you have a database called TST, and the user TEST with the password TEST.
Example of the call for compiling the file test.cpc:
cpc -d TST -u TEST,TEST test