SQL Programming Manual for TAL

Introduction
HP NonStop SQL Programming Manual for TAL527887-001
1-7
Compiling and Executing a Program
Compiling and Executing a Program
Compiling and executing a TAL program that contains embedded SQL statements is
similar to the steps you use for a TAL program that does not contain embedded SQL
statements. You must perform only one extra step: you compile the SQL statements
using the SQL compiler. These steps are shown in Figure 1-3.
1. Compile your source file (or files) using the TAL compiler. The TAL compiler
generates an object file for each compilation. Each object file contains TAL 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 TALLIB run-time library if you did not include it during
the TAL compilation in Step 1.
3. Optionally, run the Accelerator on the object file generated from Step 1 or 2 if you
plan to run the object file on a TNS/R system.
4. Compile the SQL statements in the TAL object file using the SQL compiler.
5. Run the object file from a terminal using the TACL RUN (or RUND) command or
from a process using a system procedure such as NEWPROCESS.