SQL Supplement for H-Series RVUs
SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs—529446-005
1-12
Preparing for Compilation
Preparing for Compilation
Before compiling an embedded SQL/MP program, verify that the source code is ready
for compilation and configure the compilation environment. Follow these guidelines:
•
Verifying the Source Code on page 1-12
•
SQL Compiler Directive on page 1-14
•
Copying Source Code Into a Compilation Unit on page 1-15
•
Setting DEFINEs on page 1-16
•
Using PARAM Commands on page 1-18
Verifying the Source Code
Before compiling the program, verify that the source code contains the required
elements for compilation and any optional features that you wish to have.
Feature or Option Guidelines and Descriptions
SQL directive Required either in the compilation unit before the first Identification
Division or on the compiler command line of the COBOL85
compiler (TNS mode). The SQL directive works only if the LIST
directive is active and the SUPPRESS directive is not.
Required on the compiler command line of the NMCOBOL
compiler (TNS/R mode) and the ECOBOL compiler (TNS/E mode)
See the SQL Compiler Directive
on page 1-14.
SQLMEM directive Optional in the source code or on the compiler command line of
the COBOL85 compiler (TNS mode)
See the COBOL Manual for TNS and TNS/R Programs.
SQLCODE identifier Required for each program and nested program. You must
declare an SQLCODE identifier either explicitly as a data item or
implicitly using the INCLUDE SQLCA directive.
See Section 9, “Error and Status Reporting,” of the SQL/MP
Programming Manual for COBOL.
SQLCODE level-88
items
Optional. You can use level-88 items with an SQLCODE data item
by substituting an SQLCODEX data item. See “Using the
SQLCODEX Data Item” in Section 9 of the SQL/MP Programming
Manual for COBOL.
SQLCA data structure Optional. The compiler:
•
Declares an SQLCA structure in a program only if the source
file specifies an INCLUDE SQLCA directive.
•
Allows an INCLUDE SQLCA directive in the Extended-
Storage Section.










