Informix Error -8007: There is an unmatched quote in a quoted string.
Cause and resolution
There is an unmatched quote in a quoted string.
This line of the report specification contains an odd number of quote (") symbols. A quoted string cannot include a new-line character; all quoted strings must be complete in one line. In order to print a longer string, store its parts in variables and list them all in a PRINT statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8007 fires when a report specification line has an odd number of double-quote characters — per the official guidance.
- An unmatched (odd-count) quote on the flagged line, per the official guidance — the direct, only cause.
- A quoted string spanning multiple lines, per the official guidance — quoted strings must be complete on one line, since they can't include a newline.
Solutions / Resolution
- Balance the quotes on the flagged line.
- For a longer string, store its parts in variables and list them all in a
PRINTstatement, per the official guidance, instead of one multi-line quoted string.
Examples
An unmatched quote
PRINT "Order confirmed
-- -8007: the closing quote is missing
Corrected
PRINT "Order confirmed"
Diagnostic Checks
- Count the double-quote characters on the flagged line, and confirm they pair up evenly.
Related Errors / Related Topics
- -8006 — "A quoted string may not exceed 80 characters in length." A related quoted-string error, about excessive length rather than an unmatched quote.
A quoted string's quotes are unbalanced on one line — quoted strings can't span multiple lines; balance the quote or use variables for longer text.