SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-26
The Accelerator
The Accelerator
The Accelerator enables you to optimize TNS programs to run faster on TNS/R
systems. A TNS object file that has been accelerated for a TNS/R system has the
original TNS code plus the logically equivalent optimized RISC instructions.
If you compiled a TNS object file in the Guardian environment or chose not to
accelerate a TNS object file during compilation in the OSS environment, run the
Accelerator at a TACL prompt to accelerate the object file.
For example, this command accelerates a TNS object file, embdsqlobj, which
contains embedded SQL/MP statements, and generates an accelerated object file
named tnsrsqlobj:
AXCEL embdsqlobj, tnsrsqlobj
For more information, see the Accelerator Manual.
Running the SQL Compiler
The SQL compiler (SQLCOMP) generates SQL object code in the program file.
SQLCOMP verifies SQL objects used in SQL statements and generates an optimized
execution plan for each SQL statement. Optionally, you can invoke the EXPLAIN utility
during compilation to generate a report on the execution plans for SQL DML
statements and DEFINEs used by the program.
Required Access Authority
To run the SQL compiler for an SQL program file, you must have this access authority:
Read and purge access to the SQL program file
Read and write access to the PROGRAMS, USAGES, and TRANSIDS tables of
the catalog in which the SQL program file is to be registered
Read and write access to the USAGES and TRANSIDS tables of any catalog in
which a table, view, collation, or index that the SQL program file uses is registered
Note. In the OSS environment of a TNS/R system, you can invoke the Accelerator by
specifying the -Waxcel flag on the cobol utility command line. For more information, see
Running the cobol Utility in the OSS Environment
on page 6-17.
Caution. You can use the Accelerator to optimize TNS object code running on a TNS/R
system. The Accelerator, however, invalidates SQL program files. Therefore, run the
Accelerator before you explicitly SQL compile the program to avoid having to recompile. For
more information, see Acceleration of TNS HP COBOL Programs
on page 6-23.