SQL/MP Programming Manual for COBOL

HP NonStop SQL/MP Programming Manual for COBOL529758-003
1-1
1 Introduction
NonStop SQL/MP is the HP relational database management system (RDBMS) that
uses SQL to define and manipulate data in an SQL/MP database. You can run SQL
statements interactively by using the SQL/MP conversational interface (SQLCI) or
programmatically by embedding SQL statements and directives in a host-language
program written in COBOL, C, Pascal, or TAL.
This manual describes the programmatic interface to SQL/MP for COBOL programs.
This section discusses:
Advantages of Using Embedded SQL Statements
Development of a COBOL Program on page 1-2
Dynamic SQL Operations on page 1-6
SQL/MP Version Management on page 1-7
COBOL in the Open System (OSS) Environment on page 1-7
Effect on Conformance to ISO/ANSI Standards on page 1-8
Advantages of Using Embedded
SQL Statements
Embedding SQL statements and directives in a COBOL program to access an
SQL/MP database has these advantages:
A high-level, efficient database language—You can code a request to access the
database by using SQL statements. The SQL optimizer then generates an efficient
plan to perform your request.
Insulation against database changes—If a database administrator modifies an
SQL/MP database (for example, adds a column to a table), the change does not
affect the logic of your program.
COBOL statements for processing data—You can access a database by using
SQL statements and then use COBOL statements to process and manipulate the
data.
System support for data consistency—If you require audited tables and views, the
system maintains data consistency with the locking feature and the HP NonStop
Transaction Management Facility (TMF) subsystem.