Informix Error -26388: Cannot use r macro in CLOBDIR %s without having a matching macro in filename %s.
Cause and resolution
Cannot use r macro in CLOBDIR %s without having a matching macro in filename %s.
Could not use the formatting macro r in CLOBDIR 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 CLOB) USING ( DATAFILES ( "DISK:/tmp/ext_byte.dat; CLOBDIR=/tmp/clobdir1.%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 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
-26388 fires when the %r macro is used in CLOBDIR but the DATAFILES DISK filename
has no corresponding %r macro — per the official guidance.
%rused inCLOBDIRwhile theDISKfilename has no matching%rmacro, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the
%rmacro fromCLOBDIRentirely, per the official guidance, or - Add a matching
%rmacro to theDISKfilename, per the official guidance.
Examples
CLOBDIR %r with no matching filename macro
CREATE EXTERNAL TABLE exttab (col1 INTEGER, col2 CLOB)
USING (
DATAFILES ("DISK:/tmp/ext_byte.dat; CLOBDIR=/tmp/clobdir1.%r(1..2)"),
DELUXE, DELIMITER "%", recordend "\n", maxerrors 20,
rejectfile "/tmp/ext_byte.log"
);
-- -26388: no %r macro in the DISK filename
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
- Check whether the
DISKfilename has a%rmacro matchingCLOBDIR's, and add one, or removeCLOBDIR's.
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 missing filename counterpart. - -26387 — "Cannot use r macro in BLOBDIR %s without having a matching macro in
filename %s." The same class of restriction, for
BLOBDIRrather thanCLOBDIR. - -26390 — "Range for r macro in CLOBDIR %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.
CLOBDIR used %r with no matching macro in the DISK filename — add one, or remove
CLOBDIR's.