Fast load Error

Tools
Enthusiast

Fast load Error

Hi 

I am getting error while trying to run a fastload script. The error says " FDL4822 DEFINE statement rejected".

Below is the script:

.logon abcd/passwd;

.set record vartext " ";

create table abc

(

eno. interger,

ename varchar(20),

dno integer,

sal decimal(10,2)

)

unique primary index(eno);

.DEFINE

eno (varchar(20)),

ename (varchar(20)),

dno (varchar(20)),

sal (varchar(20));

.BEGIN LOADING abc

.ERRORFILES

emp_err1,emp_err2

.CHECKPOINT 10000

File = file path

show;

insert into abc

(

:eno,

:ename,

:dno,

:sal

);

.END LOADING;

.logoff;

6 REPLIES
Teradata Employee

Re: Fast load Error

When in doubt, please read the manual.

The "File" specification is part of the DEFINE statement.

You have the BEGIN LOADING command in between the DEFINE and the "File".

And the syntax of your BEGIN LOADING is incorrect.

The FastLoad Reference manual will provide you with everything you need.

-- SteveF
Senior Apprentice

Re: Fast load Error

And there's another error, remove the period before DEFINE:

• Commands may begin with a period, but do not have to begin with a period.

• If there is no leading period, then there must be a semicolon at the end.

• If the command has a leading period, it must all be on one line. Commands that begin

with a period cannot span multiple lines.

Enthusiast

Re: Fast load Error

Thanks Dieter and Steve for your help. Much appreciated

Re: Fast load Error

FDL4800 Invalid FastLoad statement

hi,

I am trying to give file path and it is showing the above error. here is the fastload commands executed in unix os

.logon 127.0.0.1/dbc,dbc;\

set vartext ",";

define

(

col1 (varchar(10)),

col2 (varchar(10)),

aol1 (varchar(10))

);

these commands are  executed.

File=./root/fastloaddata1.txt;  (i am not able to execute this command)

kindly help 

Rajesh

Teradata Employee

Re: Fast load Error

Rajesh,

see the difference. 

.logon 127.0.0.1/dbc,dbc;

set vartext ",";

define

col1 (varchar(10)),

col2 (varchar(10)),

aol1 (varchar(10))

File=./root/fastloaddata1.txt; 

"file=" is part of define statement.

Teradata Employee

Re: Fast load Error

this is sample script for fastload.

.LOGON NODEID/user,password;

DROP TABLE emp_e1;
DROP TABLE emp_e2;
DROP TABLE emp;

.SET RECORD vartext ';' ;

CREATE TABLE emp, FALLBACK(
F1 INTEGER, F2 CHAR(10))
UNIQUE PRIMARY INDEX (F1);

BEGIN LOADING emp ERRORFILES emp_e1,emp_e2 CHECKPOINT 10000;

DEFINE
FIELD1 (VARCHAR(4), NULLIF='NaReNaNa'),
FIELD2 (VARCHAR(10))
FILE=TEDA1004;

INSERT INTO emp VALUES ( :FIELD1, :FIELD2 );

END LOADING;
.LOGOFF;