Informix Error -1008
-1008 Termcap entry too long.
The contents of the TERMCAP environment variable, or of the termcap entry from the termcap database, are read into storage when the application is initializing. However, the memory buffer that is allocated to hold the termcap entry is 1,024 bytes, and the entry in use is longer than that. Use a simpler termcap.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1008 fires when the termcap entry being read (from the TERMCAP environment variable or the
termcap database) exceeds the 1,024-byte buffer allocated for it at application initialization —
per the official guidance, this is a fixed-size buffer limit.
- A termcap entry longer than 1,024 bytes, per the official guidance — the direct, only cause, typically from an unusually elaborate or verbose terminal definition.
- A
TERMCAPenvironment variable holding the full entry text inline (rather than a path to a termcap file), which can more easily approach the byte limit than a file-based definition.
Solutions / Resolution
- Use a simpler termcap configuration, per the official guidance — a shorter, less elaborate terminal definition that fits within the 1,024-byte buffer.
- If
TERMCAPholds the entry text directly, consider pointing it at a termcap file instead, keeping the environment variable itself short.
Examples
Checking the entry's length
$ echo -n "$TERMCAP" | wc -c
1180
This measures the entry's length only when TERMCAP holds the entry text inline. If TERMCAP
instead holds a path to a termcap file, measure the specific entry within that file instead
(the path's own length isn't meaningful here).
Diagnostic Checks
- Measure the length of the termcap entry in use, and simplify it if it exceeds 1,024 bytes.
Related Errors / Related Topics
- -1005 — "Your specified termcap file cannot be read." A related termcap error, about the file being inaccessible rather than the entry being too long.
- -1007 — "Invalid value for the INFORMIXTERM environment variable." A related terminal- configuration error, about the facility selector rather than the termcap entry's content.
- -1009 — "Bad termcap entry." A related termcap-content error, about malformed punctuation rather than excessive length.
- -1010 — "Too many tc= indirections." A related termcap-content error, about chained references rather than raw length.
A fixed 1,024-byte buffer for termcap entries — simplify the terminal definition if it's too long.