SQL/MX 3.1 Programming Manual for C and COBOL (H06.23+, J06.12+)

C/C++ Program Compilation
HP NonStop SQL/MX Release 3.1 Programming Manual for C and COBOL663854-001
15-32
Windows-Hosted SQL/MX C/C++ Preprocessor
invokeSchema
sets the schema for unqualified objects inside the invoke clause as schema-
name. If a schema is specified using the Control Query Default Schema or
Declare Schema, this attribute has no effect. The maximum size of the
invokeSchema attribute is 128 characters.
-I
processes the nested #include files.
-w
handles warnings for SQLCODE and SQLSTATE declarations.
sqlcode
issues a warning if SQLCODE is undeclared or not declared as long
SQLCODE in the Declare section.
sqlstate
issues a warning if SQLSTATE is undeclared or not declared as char
SQLSTATE[6] in the Declare section.
both
issues warnings if either or both SQLCODE and SQLSTATE are undeclared or
not declared as long SQLCODE and char SQLSTATE[6] respectively in the
Declare section.
-f
specifies whether to reduce size by one or not for the null terminator of the
character type descriptor. The default value is CHAR_AS_STRING. The following
rules apply:
CHAR_AS_STRING – reduces the size by one from the value specified in the
variable declaration.
CHAR_AS_ARRAY – retains the size specified in the variable declaration.
Example—mxsqlc
Run the SQL/MX C/C++ preprocessor using the mxsqlc command. This C++ example
creates an annotated source file and module definition file:
mxsqlc sqlprog.ecpp -c sqlprog.cpp -x -m sqlprog.m -p \
-g moduleGroup=INVENTORY -g moduleVersion=V2
This C++ example creates a single-file annotated output source file that contains an
embedded module definition:
mxsqlc sqlprog.ecpp -c sqlprog.cpp -g moduleTableSet=TEST1