SQL/MX Connectivity Service Manual for SQL/MX Release 3.2 (H06.25+, J06.14+)

.err Files
The *.err files are intermediate files available at a location specified in
COMPILED_MODULE_LOCATION EVAR, which reports MXCMP errors, if any, generated during
module file creation.
If MXCMP passes successfully, the *.err files are removed automatically after the module file is
created. Otherwise, the *.err files are stored at the specified location for further analysis of the
reported failure.
.lock Files
The *.lock files are generated for every query that pass through the MFC module file creation
process. These files are also used for synchronizing, so that different connections do not re-create
the same module file. The *.lock files are deleted from the specified
compiled_module_location directory after the binary module is successfully created.
The *.lock files are not deleted for the queries that cannot create module files. For example,
ODBC application queries using scalar functions, such as SUM or AVG or ABS cannot create
module files.
.mdf Files
The .mdf temporary files are generated during preprocessing. These .mdf files are retained for
easier support and troubleshooting.
The preprocessor creates an SQL module definition file in the <compiled_module_location>
location that contains the embedded SQL statements.
NOTE: For more information on module definition files, see the HP NonStop SQL/MX Programming
Manual for C and COBOL.
.lst Files
The .lst files are the output of the SQL/MX C/C++ preprocessor. In rare cases, these files might
contain compiler errors.
.sql Files
The .sql files contain the generated source code of the statement. This file is read by the mxsqlc
preprocessor to produce the .mdf file. The .sql files can be used to tune an SQL statement by
adding statement-specific Control Query Default and/or shapes.
In releases prior to SQL/MX Release 3.2, MFC did not support parameterized queries with BIGNUM
data type.
The following is a sample .sql file used prior to SQL/MX Release 3.2:
# include <stdio.h>
EXEC SQL MODULE "MFCABS1031CAT"."SCH"."B4FABF7702B9046B0E8F94FAC72E7027" NAMES A
RE ISO88591;
int main ()
{
EXEC SQL BEGIN DECLARE SECTION;
SQL_TYPE_NULL param0;
short param0_ind = -1;
EXEC SQL END DECLARE SECTION ;
EXEC SQL CONTROL QUERY DEFAULT ODBC_PROCESS 'TRUE';
EXEC SQL CONTROL QUERY DEFAULT JDBC_PROCESS 'TRUE';
EXEC SQL CONTROL QUERY DEFAULT GENERATE_EXPLAIN 'ON';
EXEC SQL CONTROL QUERY DEFAULT NAMETYPE 'ANSI';
EXEC SQL CONTROL QUERY DEFAULT INFER_CHARSET 'ON';
EXEC SQL CONTROL QUERY DEFAULT RECOMPILATION_WARNINGS 'ON';
EXEC SQL DECLARE SCHEMA CAT.SCH ;
EXEC SQL SET SCHEMA CAT.SCH ;
EXEC SQL DECLARE MXSTMT01 CURSOR FOR SELECT * FROM MYTAB6 WHERE INFO = :param0 ;
52 Starting, Configuring, and Managing MXCS