All Forums Database
bugmenot 8 posts Joined 03/11
28 Sep 2013
Unable to figure out the error out of range input data

Dear All,
I am having hell a lot of problems with my first mload script. I am just trying to load the sample file but not able to do so. I am here with providing the details of the file below.
****************************************************** ********
MLOAD SCRIPT:
.logtable financial.inslogtable;
.logon 192.168.153.128/dbc,dbc;
CREATE TABLE financial.employee (
EmpNo SMALLINT FORMAT '9(5)' BETWEEN 10001 AND 32001 NOT NULL
)
UNIQUE PRIMARY INDEX( EmpNo );
.begin import mload tables financial.employee;
.layout inslayout;
.field EmpNo 2 char(9);
.dml label insdml;
insert into financial.employee.*;
.import infile C:\TeradataDataFiles\insert.input.txt
format text
layout inslayout
apply insdml;
.end mload;
.logoff;
****************************************************** *******
DATA FILE
|10021|
|10001|
|10002|
|10028|
|10029|
|10023|
****************************************************** *******
LOG FILE
 ====================================================== ==================
     =          MultiLoad Acquisition Phase                                 =
     ====================================================== ==================
**** 01:06:05 UTY4203 Attempted to access out of range input data in field
     'EMPNO', file 'C:\TeradataDataFiles\insert.input.txt',record number '1'.
**** 01:06:05 UTY1803 Import processing statistics
     .                                       IMPORT  1     Total thus far
     .                                       =========     ==============
     Candidate records considered:........           1.......           1
     Apply conditions satisfied:..........           0.......           0
     Candidate records not applied:.......           0.......           0
     Candidate records rejected:..........           0.......           0
**** 01:06:05 UTY1821 Aquisition Phase statistics
     Elapsed time:  00:00:02
     CPU time:      0.0156001 Seconds
     MB/sec:        0
     MB/cpusec:     0
     ====================================================== ==================
     =          Logoff/Disconnect                                           =
     ====================================================== ==================
**** 01:06:06 UTY6215 The restart log table was not dropped by this task.
**** 01:06:07 UTY6212 A successful disconnect was made from the RDBMS.
**** 01:06:07 UTY2410 Total processor time used = '2.07481 Seconds'
     .       Start : 01:05:54 - SUN SEP 29, 2013
     .       End   : 01:06:07 - SUN SEP 29, 2013
     .       Highest return code encountered = '12'.
Can you please provide me the solution to this?
 
Regards
Suresh

 
 
 

Adharssh 36 posts Joined 08/13
29 Sep 2013

Hi,
 
You can change this line from
.field EmpNo 2 char(9);
to 
.field EmpNo 2 VARCHAR(9);
This will work. If we specify, CHAR(9). It will try to check for 9 characters from the position 2.So that it will fail.
 
Thanks & Regards,
Adharssh.

Share the Knowledge. Feel the Happiness, When you share/Teach it.

You must sign in to leave a comment.