SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
16-13
OSS-Hosted SQL/MX COBOL Preprocessor
OSS-Hosted SQL/MX COBOL Preprocessor
You can compile and run an embedded SQL COBOL program in the OSS environment
on a NonStop system. Although you cannot compile and run such a program in the
Guardian environment, you can use an OSS pass-through command in the Guardian
environment. For instructions on using the Windows-hosted SQL/MX COBOL
preprocessor, see Windows-Hosted SQL/MX COBOL Preprocessor on page 16-16.
For instructions on using the OSS pass-through command to execute the preprocessor
in the Guardian environment, see Building SQL/MX Guardian Applications in the
Guardian Environment on page 16-40.
The OSS-hosted SQL/MX COBOL preprocessor (mxsqlco) is installed in the
/usr/tandem/sqlmx/bin directory in the OSS environment. You can use the
nmcobol utility to preprocess embedded SQL COBOL programs, compile COBOL and
run the SQL/MX compiler, and then link the COBOL program. For more information,
see nmcobol Utility: Using One Command for All Compilation Steps on page 16-29.
Syntax for the OSS-Hosted SQL/MX COBOL Preprocessor
sql-file
is the name of the input COBOL source file that contains embedded SQL
statements.
-c COBOL-output-file
is the name of the output preprocessed annotated source file that contains COBOL
statements and embedded SQL statements converted to comments. This file is the
input for the COBOL compiler (nmcobol utility). The default is source-
mxsqlco sql-file
[ -c COBOL-output-file ]
[ -m module-def-file ]
[ -e ]
[ -l list-file ]
[ -a ]
[ -f ]
[ -t timestamp ]
[ -q ]
[ -d toggle || SETTOG ]
[ -x ]
[ -g {moduleGroup[=module-group-specification-string]
|moduleTableSet[=module-tableset-specification-
string]
|moduleVersion[=module-version-specification-
string]
|moduleCatalog[=module-catalog-name]
|moduleSchema[=module-schema-name]
}]