SQL/MX Comparison Guide for SQL/MP Users
Embedded SQL
HP NonStop SQL/MX Comparison Guide for SQL/MP Users—523735-003
4-11
SQL/MX Compiler
SQL/MX Compiler
The SQL/MX program compilation process is different from that of NonStop SQL/MP.
After you have compiled your program, you have two files: a host language source file
and an SQL/MX module.
This high-level procedure compiles a program with NonStop SQL/MX and is shown in
Figure 4-2 on page 4-12:
1. Using an editor, create the embedded SQL application.
2. Run the SQL/MX host language (C or COBOL) preprocessor to:
•
Parse the EXEC SQL statements and replace them with CLI calls.
•
Create a module definition file describing the SQL statements. The module
definition file is a separate file instead of being embedded within the compiled
objects.
Figure 4-1. SQL/MP Compilation Process
SQL
Compiler
Source File
Binder Process
SQL
Program File
Host Language
Compiler
Host Language and
SQL Statements
Host Language Object
File With SQL Source
Statements
Valid SQL Program File
Ready for Execution
Binder Process to
Combine the Host
Language Object File
With Other Object Files
Host
Language
Object File