14. Error Codes and Messages#
Precompiler Errors#
The messages for the errors that can be raised during the precompile operation have the following format:
Error Format#
[ERR-<error code> : <error message>]
File : <file name>
Line : <line number>
Offset : <n-m>
Error_token : <error token>
<error code>: This is the numerical code corresponding to the error that occurred.
<error message>: This is the corresponding error message.
<file name>: This is the name of the file containing the code that caused the error.
<line number>: This is the number of the line in which the error occurred.
<n-m>: This is the start and end character indicating the portion of the line in which the error occurred.
<error statement>: This is the kind of statement that caused the error.
Example#
The following example shows the error that is raised when the EXEC SQL END DECLARE SECTION statement is missing from the source code.
[ERR-302L : EXEC SQL END DECLARE SECTION is not exist.]
File : tmp.sc
Line : 4
Offset: 1-31
Error_token:EXEC SQL BEGIN DECLARE SECTION;
Error Code Format#
The error code system that occurs during preprocessing is as follows.
ERR-xxxY
xxx: This is the error number.
Y: This is a single alphabetic character that indicates the error category (see below).
Error Numbers#
The error numbers fall within certain ranges that indicate the kind of error that occurred. These ranges are as follows:
101 – 199: These are system errors.
201 – 299: These are errors related to host variables.
301 – 399: These are cursor-related errors.
401 – 499: These are general errors.
701 – 799: These are errors related to the lack of support for some functionality in the current version.
Error Categories#
These error categories indicate the precompiling task that was underway when the error occurred.
E: This indicates that the error occurred while processing the host variable declaration section.
L: This indicates that the error occurred while processing an embedded SQL statement.
M: This indicates that the error occurred while performing macro substitutions.
H: This indicates that the error occurred when performing a task other than those listed above.
Error Codes/Messages List#
101H – 199H#
| Error Code | Error Message |
|---|---|
| 101H | File '\<file name>' open error. |
| 102H | FileSize(\<file name>) is zero. |
| 103H | The include file [\<file name>] does not exist in the folder. |
| 104H | File '\<file name>' delete error. |
| 105H | Memory allocation error. |
| 106H | Latch initialize error. (\<file name>:\<line>) |
| 107H | Latch read error. (\<file name>:\<line>) |
| 108H | Latch release error. (\<file name>:\<line>) |
| 109H | Latch write error. (\<file name>:\<line>) |
| 110H | Latch destroy error. (\<file name>:\<line>) |
| 111H | File close error. |
| 112H | File \<file name> write error. |
201E – 299E#
| Error Code | Error Message |
|---|---|
| 201E | C-type Comment is not closed. |
| 202E | The structure name \<name> is unknown. |
| 203E | The structure name \<name> is a duplicate. |
| 204E | The symbol name \<name> cannot be added to the symbol table. |
| 205E | The symbol name exceeds the maximum length. [\<name>] |
| 206E | Redefinition of '\<name>'. |
| 207E | Unknown type '\<name>'. |
| 208E | Invalid scope depth [\<depth>]. |
| 209E | Inconsistent brace count. |
| 210E | Inconsistent parenthesis count error. |
| 211E | The nested structure exceeds the maximum possible depth. |
| 212E | VARCHAR declarations are not permitted in #include files. |
301L – 399L#
| Error Code | Error Message |
|---|---|
| 301L | The C include file can't contain embedded SQL statements. |
| 302L | EXEC SQL END DECLARE SECTION does not exist. |
| 303L | EXEC SQL BEGIN DECLARE SECTION does not exist. |
| 304L | EXEC SQL END ARGUMENT SECTION does not exist. |
| 305L | EXEC SQL BEGIN ARGUMENT SECTION does not exist. |
| 306L | Unterminated string error. |
| 307L | The connection name [\<name>] is too long. (max length is 50) |
| 308L | The cursor name [\<name>] is too long. (max length is 50) |
| 309L | Statement name [\<name>] is too long. (max length is 50) |
| 310L | The number of FOR loop iterations must be greater than zero. |
| 311L | The host variable [\<name>] is unknown. |
| 312L | The host variable in a FREE LOB statement must be a LOB locator. |
| 313L | Unterminated embedded SQL statement. |
| 314L | The indicator variable [\<name>] should be of type SQLLEN or a compatible type. |
| 315L | Two or more arrays of structures are bound to host variables in the same statement. |
401M – 499M#
| Error Code | Error Message |
|---|---|
| 401M | An unknown macro is too long. (>2k) |
| 402M | Macro #if statement syntax error |
| 403M | Macro #elif statement syntax error |
| 404M | Macro #elif statement sequence error |
| 405M | Macro #else statement sequence error |
| 406M | Macro #endif statement sequence error |
| 407M | An empty char constant cannot be used with an #if macro expression. |
| 408M | Include files are nested too deeply. (maximum \<0%s>) |
| 409M | No #endif error. |
| 410M | A closing parenthesis ‘)’ is missing from the macro parameter list. |
| 411M | Unknown macro name, or missing parenthesis after macro name. (\<0%s>) |
| 412M | Unterminated string error. |
501H – 599H#
| Error Code | Error Message |
|---|---|
| 501H | \<option name> option is repeated |
| 502H | Option string \<option string> is too long. |
| 503H | The -mt and -sea options cannot be used together. |
| 504H | Input file must be a form of '*.sc'. |
| 505H | Unknown embedded SQL statement type. |
701L – 799L#
| Error Code | Error Message |
|---|---|
| 701L | No CURSOR SENSITIVITY options are supported yet. |
| 702L | No CURSOR INSENSITIVITY options are supported yet. |
| 703L | No CURSOR ASENSITIVITY options are supported yet. |
| 704L | WITH HOLD option is not supported yet. |
| 705L | WITH RETURN option is not supported yet. |
| 706L | READ ONLY option does is supported yet. |
| 707L | ALTER COMPACT option is not supported yet. |