ILE COBOL Programmer's Guide

Syntax-Checker Considerations

When the syntax-checker is working with a line containing a literal, it has no way of knowing whether or not the user intends to specify the GRAPHIC option when the program is compiled. It, therefore, assumes that the default option, NOGRAPHIC, is in effect. This means that certain mixed literals that are valid if compiled with the GRAPHIC option will cause syntax errors to be flagged. For example:

"ABC0EK1K"0FDEF"

is valid when the GRAPHIC option is specified, since the double quotation mark appearing between the shift-out and shift-in characters is treated as one element of a DBCS character. The syntax-checker, however, will mistake this double quotation mark as the termination character for the literal, and the remaining characters (starting with the shift-in character) will be flagged as an error. This may be avoided by replacing the mixed literal with a combination of SBCS nonnumeric literals and pure DBCS literals.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]