Register Login

SAP MaxDB Precompiler or the Precompiler Runtime

Updated May 18, 2018

The interface between the SAP MaxDB database system and application programs (such as the SAP kernel) is referred to as the database language SQL (Structured Query Language). SQL statements are embedded into the application program (Embedded SQL) and these statements permit communication with the database. Parameter values are exchanged by a special program variable, more commonly referred to as the host variables.

The C/C++ Precompiler makes C/C++ source code with embedded SQL statements for compilation into an executable application program. It verifies the embedded statements syntactically and semantically, and later also converts them into calls of precompiler runtime procedures and then makes a C/C++ file, which can then be put together. 

When the application program is running, the precompiler runtime accepts the functions listed below: 

  • Setting up the database connections and opening the database sessions according to the specified connection options
  • Assigning parameter values
  • Converting data types
  • Executing the precompiler statements
  • Signaling NULL values (undefined values) using indicator variables
  • Displaying confirmations from the database system in the structure sqlca
  • Writing the trace file according to the specified trace options

In a typical SAP environment, the precompiler runtime is essential for the database-dependent part of the SAP kernel, commonly known as the DBSL (dbadaslib).