SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
16-11
Preprocessor Output
•
Cursors declared and not accessed return a warning message.
Preprocessor Output
COBOL Annotated Source File for Embedded Module
Definitions
The SQL/MX COBOL preprocessor processes a COBOL source file, such as source-
file.ecob, and generates one COBOL annotated source file (source-file.cbl)
as its output file. The annotated source file contains the embedded module definitions.
COBOL Annotated Source File for Module Definition Files
If you use the -x or -m preprocessor option or if you set the
SQLMX_PREPROCESSOR_VERSION=800 environment variable, the preprocessor
processes a COBOL source file, such as source-file.ecob, and generates two
files: the annotated source file (source-file.cbl) and the module definition file
(source-file.m).
For more information on module management behavior and influencing the
preprocessor, see Module Management Behavior on page 17-7. For recommended
naming conventions for COBOL source files, see Table 17-1 on page 17-1.
The preprocessor converts the embedded SQL statements to COBOL comments,
followed by the appropriate CLI calls.
The COBOL annotated source file consists of:
Header for Module Definition File
If you specify the -m or -x preprocessor option or set the
SQLMX_PREPROCESSOR_VERSION=800 environment variable, the preprocessor
Header Contains the data structures.
Body Contains the embedded SQL COBOL source file translated into
COBOL statements. The preprocessor converts each
embedded SQL statement to a COBOL comment by prefixing
an asterisk (*) to the statement and follows the commented
statement with a CLI call that invokes the executor at run time to
execute the statement.
Trailer Contains definitions required to complete the COBOL source
file. Definitions include the module version number, the creation
timestamp (the operating system timestamp when the
preprocessor was invoked), and the module name.