Problem with MLOAD with delimitor |

Database
Enthusiast

Problem with MLOAD with delimitor |

Hi,

I am trying to load a table with some data using mload and having problems. Please can some one help me with this.

MY MLOAD SCRIPT

.lOGTABLE database.Table_MLOG ;

.LOGON DW/user,pwd;

DATABASE database ;

.BEGIN IMPORT MLOAD
TABLES database.Table
WORKTABLES database.Table_WT
ERRORTABLES database.Table_ET
database.Table_UV
SESSIONS 12;

.LAYOUT Table_LAYOUT ;
.FIELD CODE * VARCHAR(1);
.FIELD TXT * VARCHAR(1000);

.DML LABEL INSERT_Table;

INSERT INTO database.Table.*;

.IMPORT INFILE c:\etllogs\RAWDATA.dat
FORMAT VARTEXT '|'
LAYOUT Table_LAYOUT
APPLY INSERT_ATable ;
.END MLOAD;
.LOGOFF &SYSRC;

SAMPLE DATA

x|xxxxx
a|aaaaaa
b|bbbbbb

TABLE DDL

CODE varchar(1)
TXT VARCHAR(1000)

MLOAD ERROR

UTY0805 RDBMS failure, 3857: Cannot use value (or macro parameter) to match CODE

Thanks

Regards
HARI

HARI
1 REPLY
Enthusiast

Re: Problem with MLOAD with delimitor |

I don't know if this typo is in your script or just in the version that you put into this message, but the name of your DML tag is different that the name in your APPLY statement:

...
.DML LABEL INSERT_Table; <--- This says "INSERT_Table"
...
APPLY INSERT_ATable ; <--- This says "INSERT_ATable"
...

It doesn't seem like that would cause the error that you received though.