Informix Error -2037: The PROGRAM attribute can only be specified for BYTE and TEXT fields.
Cause and resolution
The PROGRAM attribute can only be specified for BYTE and TEXT fields.
The field attribute PROGRAM specifies an external program to edit or display a BYTE or TEXT value; these values are assumed to be too large and specialized for the normal form-display methods. However, in this statement, the attribute is applied to a column of another type, which is not supported. Check the table and column names to make sure that they are as you intended, and verify the current definition of the table in the database that is named in the DATABASE statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2037 fires when the PROGRAM attribute is applied to a field that isn't BYTE/TEXT — per
the official guidance, PROGRAM is designed exclusively for these two types, since they're too
large or specialized for standard form-display editing (see -1353's !-to-edit mechanism).
PROGRAMspecified for a non-BYTE/TEXTfield, per the official guidance — the direct, only cause.
Solutions / Resolution
- Verify the table and column definitions in your database to ensure they match the
intended specifications, per the official guidance — confirm the field's actual type, and
remove
PROGRAMif it isn't genuinelyBYTE/TEXT.
Examples
PROGRAM on a non-BLOB field
ATTRIBUTES
status = order_status, PROGRAM = "/usr/bin/vi";
-- -2037: order_status is CHAR, not BYTE/TEXT
Corrected
ATTRIBUTES
notes = order_notes, PROGRAM = "/usr/bin/vi";
Diagnostic Checks
- Check the declared type of any field using
PROGRAM, and confirm it'sBYTE/TEXT.
Related Errors / Related Topics
- -1353 — "Use '!' to edit TEXT and BYTE fields." A related
TEXT/BYTE-editing mechanism, describing howPROGRAMis actually invoked once correctly configured. - -1360 — "No PROGRAM= clause for this field." A related
PROGRAM-attribute error, about aBYTE/TEXTfield missingPROGRAMentirely, rather thanPROGRAMon the wrong field type.
PROGRAM was applied to a non-BYTE/TEXT field — confirm the field's actual type.