SQL Supplement for H-Series RVUs

SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs529446-005
1-13
Preparing for Compilation
SQL statement
placement
COBOL statements and embedded SQL statements can be on the
same line, except that a COBOL statement must follow the SQL
statement terminator, cannot precede an SQL statement, and
cannot be a COPY or REPLACE statement.
Library files Optional. Use the COBOL SOURCE directive to enable the
compiler to accept source text from a different EDIT file.
COPY and
REPLACE statements
Optional. The compiler implements these restrictions:
A COPY or REPLACE statement is not allowed within SQL
statements and cannot contain SQL statements.
COPY and REPLACE affect SQL statements only between
BEGIN DECLARE and END DECLARE directives.
A COPY statement cannot copy source text that contains
SQL statements.
A REPLACE statement that precedes one or more SQL
statements does not affect them, except in a Declare Section.
SQL cursors Optional. Local and foreign cursors are supported.
SQL statements in
listing
The compiler lists SQL statements in the compiler listing exactly
as they appear in the source program.
INVOKE and
INCLUDE directives
Optional. The compiler replaces INVOKE and INCLUDE directives
with COBOL data declarations that correspond to the SQL
structures being invoked or included.
Inspect debugger and
Visual Inspect
You can use the Inspect debugger (for TNS/R) or Visual Inspect
(for TNS/R and TNS/E) on a COBOL object file. However, the
current source line indicated by the Inspect debugger or Visual
Inspect depends on how you produced the object file.
When you use the Inspect debugger or Visual Inspect on an
object file that contains embedded SQL, the current source line
indicated by the debugger is the embedded SQL statement itself.
See the Inspect Manual or the online help for Visual Inspect.
CROSSREF program
and
CROSSREF directive
Optional. CROSSREF lists any embedded SQL statements that
contain referenced and changed variables in TNS HP COBOL
programs.
The NMCOBOL and ECOBOL compilers do not produce a cross-
reference listing. If you need one for a native TNS/R program, use
the noft utility with the XREFPROC flag. See the noft Manual. If
you need one for a native TNS/E program, use the enoft utility
with the XREFPROC flag. See the eNOFT Manual.
Feature or Option Guidelines and Descriptions