EasyManuals Logo

HP NonStop SQL/MP User Manual

HP NonStop SQL/MP
331 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #128 background image
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for C—429847-008
6-12
Running the SQL Compiler in the Guardian
Environment
ï‚·
Do not bind object files with functions that have the same name and contain
embedded SQL statements. The SQL compiler uses the function name as the
run-time data unit (RTDU) name. Therefore, when the SQL statement runs,
functions with the same name generate ambiguous references that can cause
run-time SQL errors.
How you use the Binder program differs, depending on whether you are binding a
single-module program or a multiple-module program.
For a single-module program, the C compilers automatically invoke the Binder program
and generate an executable object file if you specify the RUNNABLE pragma. You
specify the RUNNABLE pragma in the source code file or as a compiler option in the
TACL RUN command line when you compile your program:
C / IN csrc, OUT $s.#clist, NOWAIT / cobj; RUNNABLE
If you do not specify the RUNNABLE pragma when you compile a program, you must
explicitly use the Binder program or linker to set this attribute in the object file.
For a multiple-module program, use the Binder program or linker to combine the object
code from each module into a single executable object file.
To run the Binder program, enter the BIND command at the TACL prompt. The Binder
program displays its banner and prompt, an at sign (@).
In the next example, the Binder commands combine the cobj1 and cobj2 files into
an executable object file named progfile and set the RUNNABLE attribute for
progfile. The SELECT LIST * OFF command improves performance by turning all
listings off.
@ADD * FROM cobj1
@ADD * FROM cobj2
@SELECT RUNNABLE OBJECT ON
@SELECT LIST * OFF
@BUILD progfile
For more information about the Binder program, see the Binder Manual.
Running the SQL Compiler in the Guardian Environment
The SQL compiler (SQLCOMP) compiles SQL source statements in a program file,
generates SQL object code for each statement, determines an optimized execution
plan for each SQL statement against the database, and stores the code and plan in the
SQL object program. Optionally, you can invoke the EXPLAIN utility during SQL
Caution. The Binder STRIP command without the SYMBOLS or AXCEL option removes the
Binder table from an SQL program file. Without the Binder table, the SQL compiler cannot
compile the program file, and the SQL executor cannot run it.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP NonStop SQL/MP and is the answer not in the manual?

HP NonStop SQL/MP Specifications

General IconGeneral
BrandHP
ModelNonStop SQL/MP
CategorySoftware
LanguageEnglish

Related product manuals