SQL/MX Comparison Guide for SQL/MP Users

Embedded SQL
HP NonStop SQL/MX Comparison Guide for SQL/MP Users523735-003
4-12
SQL/MX Compiler
3. Run the SQL/MX compiler to create execution plans for the SQL statements and
store the plans in a module file.
4. Run the C or COBOL compiler to compile the statements in the source file.
5. Execute the program in the OSS environment, as described in the SQL/MX
Programming Guide for C and COBOL.
The key difference in the SQL/MX compilation is the resulting two files: the SQL
module, which stores the query plan, and the host language program file.
For more information about the SQL/MX module, see the SQL/MX Programming Guide
for C and COBOL. For syntax for the MODULE directive, see the SQL/MX Reference
Manual.
Figure 4-2. SQL/MX Compilation Process
Source File
(text file)
Host Language
Source File
(temporary text file)
SQL Module
Definition File
(temporary text file)
SQL Module
(stored in tdm_sqlmodules)
NonStop SQL/MX
Host Language
Preprocessor
Host Language
Compiler
NonStop SQL/MX
Compiler
Host Language and
SQL Statements
Host Language
Statements
SQL Statements
Host Language
Object Code
SQL Statements
and Object Code
Host Language
Program