Example: Executing a Precompiler Application 

You want to execute a precompiler application with the name test.

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 http://www.sapdb.org/ ® Software with Sample Database ® Linux ® Create and Test a Sample Database.

Once you have installed the relevant package (5kb), use TST as the database name, TEST as the user and TEST as the user password.

You could, for example, execute the following command in a bash shell:

export SQLOPT="-d TST -u TEST,TEST"

The result of this command is that a precompiler application uses the database instance TST and the user TEST with the password TEST during runtime.