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

Exception Handling and Error Conditions
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL663854-005
13-7
Declaring SQLCODE and SQLSTATE
IN - Inside the Declare section
OUT - Outside the Declare section
ND - Not declared in the application
Table 13-4 describes the behavior of preprocessor and embedded application for
incorrect SQLCODE or SQLSTATE or both.
OUT ND Warning
for
SQLCOD
E
Warning
for
SQLSTA
TE
Warning
for both
Error for
SQLSTATE
Yes No No
Warning
ND IN Warning
for
SQLCOD
E
No
warning
Warning
for
SQLCOD
E
Error for
SQLCODE
No Yes No
Warning
ND OUT Warning
for
SQLCOD
E
Warning
for
SQLSTA
TE
Warning
for both
Error for
SQLCODE
No No No
Warning
ND ND Warning
for
SQLCOD
E
Warning
for
SQLSTA
TE
Warning
for both
Error for
both
No No No
Warning
Table 13-4. SQLCODE and SQLSTATE incorrect declaration
SQLCO
DE
SQLST
ATE
Values of -w command line
option for the preprocessor default
Values returned to
the application
sqlcode sqlstate Both
SQLCO
DE
SQLST
ATE
Correct Correct
No
warning
No
warning
No
warning
No
warning
Yes Yes
Table 13-3. SQLCODE and SQLSTATE missing declaration
SQLCOD
E
SQLSTA
TE
Values of -w command line
option for the preprocessor
Language
Compiler
Values returned to
the application default
sqlcode sqlstate Both
SQLCO
DE
SQLSTA
TE