Previous Topic Next topic Print topic


X020: Syntax error. Last symbol read was string.

The SQL Engine was unable to parse a command it was sent. When this error occurs, the system tries to display the last token it read. Check the command syntax in the SQL Reference. Make sure that all products are using the same character set (ASCII, EBCDIC, etc.). If using the COBOL, look in the errmc element of the SQLCA structure for the error tokens. SQLCA errd[4] contains the column position of the token. In CAPI, call the function xgeterr() to get the error tokens.

This error can be caused by incorrect (or inconsistent) settings of environment variables used by the Micro Focus COBOL compiler. For example, a syntax error can occur when Micro Focus is running in EBCDIC mode and XDB Server is running in ASCII mode.

If the Micro Focus COBOL.DIR directive file (or any other Micro Focus directive file) contains a CHARSET(EBCDIC) directive, then the XDBCOB.DIR directive file should contain a matching EBCDIC directive. An EBCDIC/ASCII mismatch can be deduced while checking the value of SQLERRMC (SQLCA variable) from within your Micro Focus Animator session.

If the value which appears for SQLERRMC consists of a series of unreadable characters, then a character set mismatch has probably occurred.

If using the DAYS function, you cannot use a group level for date. You must redefine the group level to one field definition. (The group level is the level that has elementary items within a COBOL program.)

Previous Topic Next topic Print topic