The user has written a precompiler program (
test.cpc).Use the command
cpc –d DB –u Armstrong,Secret testto generate the file
test.o. In this example, the database instance would be DB, the user Armstrong, and the password Secret.Use the command
cpclnk testto link the file with the runtime library and to generate an executable program.
If you want a precompiler trace to be written when the
test program is executed, you must accordingly set the environment variable SQLOPT to the value -X. In a bash shell, the command would be as follows:export SQLOPT=-X
When the
test program is executed, the precompiler trace is written to the file test.pct. This file is situated in the same directory as the test program.To test the precompiler you have installed, you can use the SAP DB demo database at
Once you have installed the relevant package (5kb), use
TST as the database name, TEST as the user and TEST as the user password.An example of a call you might use to compile the file
test.cpc:cpc -d TST -u TEST,TEST test