Informix Error -840
-840 Name is too long.
Names of databases, reports, forms, and other files must be 10 characters or shorter. Select a new, shorter name, and repeat this operation. In DOS systems, filenames can be a maximum of 8 characters plus a 3-character extension.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-840 fires when a name for a database, report, form, or other file exceeds the interactive tool's length limit — per the official guidance, 10 characters, with a stricter 8+3 DOS filename limit on that specific platform.
- A name longer than 10 characters, per the official guidance — the direct, general limit.
- On DOS specifically, a name exceeding the 8-character-plus-3-character-extension limit, per the official guidance — a platform-specific, stricter constraint.
Solutions / Resolution
- Select a new, shorter name, per the official guidance, within the 10-character limit (or the DOS 8+3 limit on that platform).
- Repeat the operation with the corrected name, per the official guidance.
Examples
Shortening a name to fit the limit
report_summary_2025 -- 20 characters, too long
rptsum25 -- 8 characters, fits
Diagnostic Checks
- Count the name's characters against the 10-character limit (or 8+3 on DOS).
Related Errors / Related Topics
- -841 — "Name must start with a letter or "" and contain letters, digits, or ""." A related naming-rule restriction, on character composition rather than length.
A 10-character limit (8+3 on DOS specifically) for these interactive-tool object names.