NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
E-2
END DECLARE SECTION Directive
NonStop SQL/MP programming manual exists for each of the four host languages
supported by NonStop SQL/MP. From each language you can also use the basic SQL
statements (but not the SQLCI commands) documented in thiis manual
You can write embedded SQL programs that run as OSS processes or Guardian
processes in the host language C. Embedded SQL programs written in COBOL85,
Pascal, or TAL must run as Guardian processes.
Embedded SQL programs communicate with SQL through host language variables
declared in an SQL declare section within the host language declare section and through
special SQL data structures called the SQLCA, the SQLDA, and the SQLSA. Embedded
SQL programs declare and use cursors to process statements that return more than one
row of data; they can also use the SQL directive WHENEVER to test for exception
conditions.
An embedded SQL statement can be either static SQL (a statement coded directly into
the source code and compiled prior to program execution) or dynamic SQL (a statement
built and compiled during program execution).
For more information see these entries:
You can also refer to the NonStop SQL/MP programming manual for the host
programming language you use.
END DECLARE SECTION Directive
END DECLARE SECTION is a host program directive that ends a host program
Declare Section for declaring host variables to use in SQL statements.
For more information about declaring host variables, see the NonStop SQL/MP
programming manual for your host language.
Dynamic SQL INCLUDE SQLCA
Directive
DECLARE CURSOR
Statement
Static SQL INCLUDE SQLDA
Directive
OPEN Statement
BEGIN DECLARE
SECTION Directive
INCLUDE SQLSA
Directive
FETCH Statement
END DECLARE SECTION
Directive
WHENEVER DIRECTIVE
END DECLARE SECTION