Informix Error -26389: Range for r macro in BLOBDIR %s does not match range in filename %s.
Cause and resolution
Range for r macro in BLOBDIR %s does not match range in filename %s.
The r macro range in the BLOBDIR string and filename in the DISK string must match exactly. 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.%r(1..2); BLOBDIR=/tmp/blobdir1.%r(10..20)" ), DELUXE, DELIMITER "%", recordend "\n", maxerrors 20, rejectfile "/tmp/ext_byte.log" );
To fix the error 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
-26389 fires when the %r macro's range in BLOBDIR doesn't exactly match the range in
the DISK filename — per the official guidance.
- The
%rrange inBLOBDIRdiffers from the%rrange in theDISKfilename, per the official guidance — the direct, only cause; the two must match exactly.
Solutions / Resolution
- Make the
%rrange inBLOBDIRmatch theDISKfilename's range exactly, per the official guidance.
Examples
Mismatched ranges
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 BLOB)
USING (
DATAFILES ("DISK:/tmp/ext_byte.dat.%r(1..2); BLOBDIR=/tmp/blobdir1.%r(10..20)"),
DELUXE, DELIMITER "%", recordend "\n", maxerrors 20,
rejectfile "/tmp/ext_byte.log"
);
-- -26389: DISK uses %r(1..2), BLOBDIR uses %r(10..20)
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
- Compare the
%rrange inBLOBDIRagainst theDISKfilename's range, and make them match exactly.
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 range mismatch. - -26387 — "Cannot use r macro in BLOBDIR %s without having a matching macro in
filename %s." A related
%r-macro error, on the filename macro being entirely absent rather than present with a mismatched range. - -26390 — "Range for r macro in CLOBDIR %s does not match range in filename %s." The
same class of range-mismatch error, for
CLOBDIRrather thanBLOBDIR.
BLOBDIR's %r range didn't match the DISK filename's range — make them match exactly.