Informix Error -1217: The format string is too large.
Cause and resolution
The format string is too large.
The pattern string that is used to format a date (either the DBDATE environment variable or the pattern that is passed to rfmtdate() or the USING function) is too long. The limit is 80 bytes.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1217 fires when a date-formatting pattern string exceeds 80 bytes — per the official guidance,
this applies to the DBDATE environment variable, and to the pattern passed to rfmtdate() or
the USING function alike.
- A
DBDATEvalue, or a pattern passed torfmtdate()/USING, longer than 80 bytes, per the official guidance — the direct, only cause.
Solutions / Resolution
- Shorten the format pattern to 80 bytes or fewer, per the official guidance.
Examples
Checking a pattern's length
$ echo -n "$DBDATE" | wc -c
Diagnostic Checks
- Measure the byte length of the format pattern (
DBDATE, or the argument torfmtdate()/USING), and shorten it if it exceeds 80 bytes.
Related Errors / Related Topics
- -1212 — "Date conversion format must contain a month, day, and year component." A related date-format error, about missing required components rather than overall pattern length.
The date-format pattern exceeds the 80-byte limit — shorten it.