EasyManua.ls 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 #154 background imageLoading...
Page #154 background image
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for C—429847-008
6-38
Using Compatible Compilation Tools
A dynamic CONTROL directive affects only dynamic SQL statements prepared after
the CONTROL directive in execution order, except as noted.
Using Compatible Compilation Tools
CCompiler
The host SQL version (HSV) identifies the SQL version of the C compiler. A C program
that uses version 300 (or later) SQL features must be compiled with a C compiler that
has an HSV of 300 (or later). To determine the HSV of the C compiler, use one of these
methods:
ï‚·
Run the VPROC program for the C compiler object file. VPROC displays a line for
each object file bound into the target object file. For the C compiler, check the
version in the VPROC line that contains S7094, which is the SQL compiler
interface (SCI) product number.
ï‚·
When you run the C compiler, specify the SQLMAP option in the SQL compiler
directive. The SQLMAP option directs the C compiler to include the HOSV in the
map at the end of the source-file listing. For example, a version 310 C compiler
listing includes this line:
Host Object SQL Version = 310
SQL Compiler
The SQL compiler (SQLCOMP) must have the same version as (or later than) the
HOSV of the SQL program file. To determine the version of the SQL compiler, use the
GET VERSION OF SYSTEM statement. All SQL/MP components on the NonStop
operating system, including the SQL compiler, must have the same version.
SQL Program Files
An SQL program file has these versions:
Note. A dynamic CONTROL TABLE directive with the TIMEOUT option affects all static and
dynamic SQL statements that follow in execution order (as opposed to listing order) until
another dynamic CONTROL TABLE directive resets the TIMEOUT option or until the program
encounters the end of the RTDU that contains the CONTROL TABLE directive.
HOSV The version of the C compiler used to compile the program. Generated by the
C compiler and therefore the same as the host SQL version (HSV) of the
C compiler.
PFV The version of the SQL compiler used to compile the program. Indicates the
oldest version of the SQL executor that can run the program. Generated by the
SQL compiler.
PCV The oldest version of the SQL catalog in which the program can be registered.
Generated by the SQL compiler.

Table of Contents

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
PlatformHP NonStop Servers
Data ModelRelational
SQL StandardANSI SQL
Concurrency ControlMulti-Version Concurrency Control (MVCC)
Fault ToleranceYes
High AvailabilityYes
CategoryDatabase Software
Initial Release1980s
Operating SystemHP NonStop OS
LicenseProprietary
TypeRelational Database Management System
Transaction ManagementACID Compliance
DeveloperHewlett Packard Enterprise

Summary

1. Introduction

Developing a C Program

Outlines the process of creating C programs with embedded SQL statements.

Dynamic SQL

Describes how to construct, compile, and run SQL statements at runtime.

2. Host Variables

3. SQL/MP Statements and Directives

4. Data Retrieval and Modification

Single-Row SELECT Statement

Retrieves a single row of data from tables or views into host variables.

Multirow SELECT Statement

Returns multiple rows from tables or views, one row at a time, using cursors.

INSERT Statement

Inserts one or more rows into a table or protection view using host variables.

Using SQL Cursors

Explains how to use named pointers to access sets of rows one at a time.

5. SQL/MP System Procedures

6. Explicit Program Compilation

Explicit Program Compilation

Outlines the general steps for compiling C programs with embedded SQL.

Developing a C Program in the Guardian Environment

Details C program development within the Guardian environment.

7. Program Execution

Required Access Authority

Specifies the access permissions needed to run NonStop SQL program files.

8. Program Invalidation and Automatic SQL Recompilation

Program Invalidation

Explains how SQL program files can become invalid due to changes or errors.

Automatic SQL Recompilation

Describes the run-time recompilation process invoked by the SQL executor.

9. Error and Status Reporting

10. Dynamic SQL Operations

Uses for Dynamic SQL

Identifies scenarios where dynamic SQL programs are beneficial.

Dynamic SQL Statements

Summarizes dynamic SQL statements usable in a C program.

11. Character Processing Rules (CPRL) Procedures

Appendix B: Memory Considerations

Avoiding Memory Stack Overflows

Provides guidelines to prevent stack overflows for SQL statements.

Related product manuals