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

COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL544617-003
16-13
OSS-Hosted SQL/MX COBOL Preprocessor
The ISO88591 character set is the default character set for CHAR or VARCHAR data
types for NonStop SQL/MX.
Procedures
After writing to the header of the module definition file, the preprocessor writes
procedures for executing SQL statements. A procedure consists of a name, a formal
argument list, and an SQL statement as the body of the procedure.
Each formal argument has a name and an SQL data type. The arguments are the host
variables that occur in the SQL statement in the body of the procedure. The
preprocessor writes the arguments in the same order as the first occurrence of the host
variables, scanning from left to right, in the SQL statement. In some cases, the
arguments are data structures that contain references to host variables. The host
variable references are stored in the same order in which they appear in the SQL
statement.
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-18.
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-44.
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
ecobol or 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 ecobol or nmcobol Utility: Using One Command for All Compilation
Steps on page 16-32.