SQL Programming Manual for Pascal

Program Compilation and Execution
HP NonStop SQL Programming Manual for Pascal528614-001
5-2
Compiling a Pascal Program
Compiling a Pascal Program
The steps you follow to compile and execute a Pascal program are described in detail
in this subsection:
1. Compile your source file (or files) using the Pascal compiler. The Pascal compiler
generates an object file for each compilation. Each object file contains Pascal
object code and SQL source statements.
2. Use the Binder program, if necessary, to combine multiple object files into one
object file or to specify the Pascal run-time library if you did not include it during the
Pascal compilation in Step 1.
3. Optionally, if you plan to run the object on a TNS/R system, run the Accelerator on
the object file generated from Step 1 or 2.
4. Compile the SQL source statements in the Pascal object file using the SQL
compiler.
Figure 5-1. Compiling and Executing a Program
VST0501.vsd
Pascal/
SQL
Source
File (s)
Run-Time
Library
Run the
object file
5
Pascal/SQL
Obejct File
4
SQL
Compiler
Pascal TNS
and TNS/R
Object Code
SQL Source
Statements
Single
Object
File
Pascal/SQL
3
Accelerator
Pascal
Object Code
SQL
Source
Statements
Single
Object File
Pascal/SQL
2
Binder
Pascal Object
Code
SQL Source
Statements
Obejct
File (s)
Pascal/SQL
1
Pascal
Compiler