Informix Error -16397: Can print only BLOB variables with program =.
Cause and resolution
Can print only BLOB variables with program =.
The PROGRAM = clause of the PRINT statement is used to specify an external program (for instance, a text editor) that can display the contents of a BYTE or TEXT value. The clause is not relevant with any other type of data.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-16397 fires when PRINT's PROGRAM = clause is used with a non-BLOB value — per the
official guidance. PROGRAM = names an external program (e.g. a text editor) to display a
BYTE/TEXT value's contents; it's not meaningful for other types.
PROGRAM =used with a value that isn'tBYTE/TEXT, per the official guidance — the direct, only cause.
Solutions / Resolution
- Only use
PROGRAM =withBYTE/TEXTvariables, per the official guidance.
Examples
PROGRAM = used on a non-BLOB variable
> PRINT myint PROGRAM = "vi"
Corrected
> PRINT mytext PROGRAM = "vi"
Diagnostic Checks
- Check that the variable given to
PRINT ... PROGRAM =isBYTE/TEXT.
Related Errors / Related Topics
- -16396 — "Cannot use BLOBs in this expression." The mirror-image restriction, about
TEXT/BYTEvariables being disallowed in ordinary expressions rather thanPROGRAM =requiring one. - -16399 — "No program name specified." A related
PROGRAM =error, about the clause being present but missing its program name.
PROGRAM = was used with a non-BLOB variable — only use it with BYTE/TEXT variables.