SQL/MX 3.2.1 Programming Manual for C and COBOL (H06.26+, J06.15+)

C/C++ Program Compilation
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL663854-005
15-25
OSS-Hosted SQL/MX C/C++ Preprocessor
-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.
-O
replaces Guardian DEFINE in the #include directive, in the OSS file format. The
DEFINEs are resolved only if the preprocessor option -O is specified.
-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