Informix Error -2934: The format width is less than the allocated display width.
Cause and resolution
The format width is less than the allocated display width.
The length of the FORMAT string that is specified for this field is less than the length of the field itself as shown in the SCREEN section. Review the screen layout, and revise it or the format so that they agree.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2934 fires when a field's FORMAT string is shorter than the field's width as declared in
SCREEN — per the official guidance, the length of the FORMAT string must agree with the
length of the field itself.
- A
FORMATstring shorter than the field's declared width inSCREEN, per the official guidance — the direct, only cause.
Solutions / Resolution
- Review the screen layout, and revise it or the format so that they agree, per the official guidance.
Examples
A FORMAT narrower than its field
SCREEN
{
Price: [price ]
}
END
ATTRIBUTES
price = unit_price, FORMAT = "###.##";
-- -2934: FORMAT is 6 characters wide, but the field is 9
Corrected
SCREEN
{
Price: [price ]
}
END
Diagnostic Checks
- Compare the
FORMATstring's character count to the field's width inSCREEN, and narrow the field or lengthen the format so they agree.
Related Errors / Related Topics
- -2933 — "The format width is larger than the allocated display width." The mirror-image error, where the format is wider than the field, rather than narrower.
The FORMAT string is narrower than its field's declared width in SCREEN — revise one to
match the other.