All Forums Tools
Rohit Ranjan 20 posts Joined 05/12
11 Aug 2014
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;

feinholz 1234 posts Joined 05/08
11 Aug 2014

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

dnoeth 4628 posts Joined 11/04
11 Aug 2014

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.

Dieter

Rohit Ranjan 20 posts Joined 05/12
12 Aug 2014

Thanks Dieter and Steve for your help. Much appreciated

RAJESH JAMPALA 1 post Joined 06/15
01 Jul 2015

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
 
 

SuSeSi 61 posts Joined 10/08
02 Jul 2015

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.

-Sudhansu

SuSeSi 61 posts Joined 10/08
02 Jul 2015

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;

 

-Sudhansu

You must sign in to leave a comment.