Informix Error -2040: The form name name exceeds the maximum length of length characters.
Cause and resolution
The form name name exceeds the maximum length of length characters.
The limit of the form compiler on names might be shorter than that of the host operating system. Rename the form-specification file, and issue the command again.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2040 fires when a form's name exceeds the Form Compiler's own maximum length — per the official guidance, this limit can be shorter than the host operating system's own filename length limit.
- A form-specification filename longer than the Form Compiler's maximum, per the official guidance — the direct, only cause, even if the OS itself would allow a longer filename.
Solutions / Resolution
- Rename the form-specification file to a shorter name, per the official guidance, and issue the command again.
Examples
Renaming an overlong form file
$ mv very_long_order_entry_form_specification_name.per order_entry.per
$ form4gl order_entry
Diagnostic Checks
- Measure the form's name length against the Form Compiler's documented maximum (which may be shorter than the OS filesystem's own limit).
Related Errors / Related Topics
- -1805 — "Invalid connection name." A related identifier-length restriction, for connection names rather than form names.
- -2022 — "This identifier exceeds the maximum length for identifiers." A related length-limit error, for form-specification identifiers rather than the form's own file name.
The form name exceeds the Form Compiler's own maximum length — rename the file shorter.