Informix Error -26387: Cannot use r macro in BLOBDIR %s without having a matching macro in filename %s.
Cause and resolution
Cannot use r macro in BLOBDIR %s without having a matching macro in filename %s.
Could not use the formatting macro r in BLOBDIR string without having a corresponding r macro in the DISK filename. The following is an example of when this error is returned:
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 BLOB) USING ( DATAFILES ( "DISK:/tmp/ext_byte.dat; BLOBDIR=/tmp/blobdir1.%r(1..2)" ), DELUXE, DELIMITER "%", recordend "\n", maxerrors 20, rejectfile "/tmp/ext_byte.log" );
To fix the error remove the formatting macro r completely or change the CREATE EXTERNAL TABLE statement to:
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 BLOB) USING ( DATAFILES ( "DISK:/tmp/ext_byte.dat.%r(1..2); BLOBDIR=/tmp/blobdir1.%r(1..2)" ), DELUXE, DELIMITER "%", recordend "\n", maxerrors 20, rejectfile "/tmp/ext_byte.log" );
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26387 fires when the %r macro is used in BLOBDIR but the DATAFILES DISK filename
has no corresponding %r macro — per the official guidance.
%rused inBLOBDIRwhile theDISKfilename has no matching%rmacro, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the
%rmacro fromBLOBDIRentirely, per the official guidance, or - Add a matching
%rmacro to theDISKfilename, per the official guidance.
Examples
BLOBDIR %r with no matching filename macro
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 BLOB)
USING (
DATAFILES ("DISK:/tmp/ext_byte.dat; BLOBDIR=/tmp/blobdir1.%r(1..2)"),
DELUXE, DELIMITER "%", recordend "\n", maxerrors 20,
rejectfile "/tmp/ext_byte.log"
);
-- -26387: no %r macro in the DISK filename
Corrected
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 BLOB)
USING (
DATAFILES ("DISK:/tmp/ext_byte.dat.%r(1..2); BLOBDIR=/tmp/blobdir1.%r(1..2)"),
DELUXE, DELIMITER "%", recordend "\n", maxerrors 20,
rejectfile "/tmp/ext_byte.log"
);
Diagnostic Checks
- Check whether the
DISKfilename has a%rmacro matchingBLOBDIR's, and add one, or removeBLOBDIR's.
Related Errors / Related Topics
- -26385 — "Could not parse r macro in BLOBDIR %s." A related
%r-macro error, on the macro's own syntax rather than a missing filename counterpart. - -26388 — "Cannot use r macro in CLOBDIR %s without having a matching macro in
filename %s." The same class of restriction, for
CLOBDIRrather thanBLOBDIR. - -26389 — "Range for r macro in BLOBDIR %s does not match range in filename %s." A
related
%r-macro error, on a range mismatch rather than the filename macro being entirely absent.
BLOBDIR used %r with no matching macro in the DISK filename — add one, or remove
BLOBDIR's.