Informix Error -26390: Range for r macro in CLOBDIR %s does not match range in filename %s.
Cause and resolution
Range for r macro in CLOBDIR %s does not match range in filename %s.
The r macro range in the CLOBDIR string and the file name 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 CLOB) USING ( DATAFILES ( "DISK:/tmp/ext_byte.dat.%r(1..2); CLOBDIR=/tmp/clobdir1.%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 CLOB) USING ( DATAFILES ( "DISK:/tmp/ext_byte.dat.%r(1..2); CLOBDIR=/tmp/clobdir1.%r(1..2)" ), DELUXE, DELIMITER "%", recordend "\n", maxerrors 20, rejectfile "/tmp/ext_byte.log" );
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26390 fires when the %r macro's range in CLOBDIR doesn't exactly match the range in
the DISK filename — per the official guidance.
- The
%rrange inCLOBDIRdiffers from the%rrange in theDISKfilename, per the official guidance — the direct, only cause; the two must match exactly.
Solutions / Resolution
- Make the
%rrange inCLOBDIRmatch theDISKfilename's range exactly, per the official guidance.
Examples
Mismatched ranges
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 CLOB)
USING (
DATAFILES ("DISK:/tmp/ext_byte.dat.%r(1..2); CLOBDIR=/tmp/clobdir1.%r(10..20)"),
DELUXE, DELIMITER "%", recordend "\n", maxerrors 20,
rejectfile "/tmp/ext_byte.log"
);
-- -26390: DISK uses %r(1..2), CLOBDIR uses %r(10..20)
Corrected
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 CLOB)
USING (
DATAFILES ("DISK:/tmp/ext_byte.dat.%r(1..2); CLOBDIR=/tmp/clobdir1.%r(1..2)"),
DELUXE, DELIMITER "%", recordend "\n", maxerrors 20,
rejectfile "/tmp/ext_byte.log"
);
Diagnostic Checks
- Compare the
%rrange inCLOBDIRagainst theDISKfilename's range, and make them match exactly.
Related Errors / Related Topics
- -26386 — "Could not parse r macro in CLOBDIR %s." A related
%r-macro error, on the macro's own syntax rather than a range mismatch. - -26388 — "Cannot use r macro in CLOBDIR %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. - -26389 — "Range for r macro in BLOBDIR %s does not match range in filename %s." The
same class of range-mismatch error, for
BLOBDIRrather thanCLOBDIR.
CLOBDIR's %r range didn't match the DISK filename's range — make them match exactly.