Multiload error

Tools
Enthusiast

Multiload error

Below is the multiload script
-----------------------
.logtable mload_log_tab;
.logon a/b,pwd;

.BEGIN IMPORT MLOAD TABLES
b.EMP, b.EMP1
WORKTABLES b.WRK_EMP
ERROR TABLES b.EMP_ET
,b.EMP_UT;

.LAYOUT FILEIN;
.field empno * char(10);
.field ename * char(30);
.field DeptNo * char(10);
.field salary * char(10);

.dml label emptab;

INSERT INTO b.EMP
(empno,ename,DeptNo,salary)
values(:empno,:ename,:DeptNo,:salary);

.dml label emp1tab;
UPDATE b.EMP1 SET SALARY= :SALARY+2000 ;

.import infile work/tmp/empmultiload.txt;
format text
layout FILEIN
apply emptab;
apply emp1tab;
.END MLOAD;

.logoff;
-------
data contains is like this
---------------------
2,RAMA,20,4000
7,SUJIT,10,7000
10,RANJAN,20,4700
4,RANU,30,6000
1,HARI,10,3000
11,UMESH,30,6900
6,SIBA,10,6300
8,RAKESH,20,3800
9,RAMESH,20,4700
5,KUNU,30,7000
3,RAJA,20,5000
5,KUNU,30,7000
3,RAJA,20,5000
10 REPLIES
Enthusiast

Re: Multiload error

On executing the script it is throwing error as given below:

0003 .BEGIN IMPORT MLOAD TABLES
b.EMP, b.EMP1
WORKTABLES b.WRK_EMP
ERROR TABLES b.EMP_ET
,b.EMP_UT;
**** 09:59:48 UTY0006 Input error in the BEGIN command at position 93: "ERROR"
========================================================================
= =
= Logoff/Disconnect =
= =
========================================================================
**** 09:59:48 UTY6215 The restart log table has NOT been dropped.
**** 09:59:48 UTY6212 A successful disconnect was made from the RDBMS.
**** 09:59:48 UTY2410 Total processor time used = '0.31968 Seconds'
. Start : 09:59:47 - SAT JAN 15, 2011
. End : 09:59:48 - SAT JAN 15, 2011
. Highest return code encountered = '8'.

bwb
Teradata Employee

Re: Multiload error

"ERROR TABLES" should be "ERRORTABLES" (that is, one word, not two).
Enthusiast

Re: Multiload error

That is corrected. But i am finding the below error
0011 .dml label emp1tab;
0012 UPDATE b.EMP1 SET SALARY= :SALARY+2000 ;

0013 .import infile work/tmp/empmultiload.txt;
**** 10:47:49 UTY0012 Bad keyword in the IMPORT command at position 52:
Expected "LAYOUT" but found nothing.
Enthusiast

Re: Multiload error

I think multiload does not support math function.
Enthusiast

Re: Multiload error

0013 .IMPORT INFILE /work/tmp/empmultiload.txt;
**** 11:06:34 UTY0012 Bad keyword in the IMPORT command at position 52:
Expected "LAYOUT" but found nothing.

I am finding this error
Enthusiast

Re: Multiload error

========================================================================
**** 11:51:45 UTY0829 Options in effect for this MultiLoad import task:
. Sessions: One session per available amp.
. Checkpoint: 15 minute(s).
. Tenacity: 4 hour limit to successfully connect load sessions.
. Errlimit: No limit in effect.
. AmpCheck: In effect for apply phase transitions.
**** 11:51:45 UTY0817 MultiLoad submitting the following request:
Select NULL from b.mload_log_tab where (LogType = 125) and (Seq =
1) and (MloadSeq = 0);
**** 11:51:45 UTY0817 MultiLoad submitting the following request:
Select NULL from b.mload_log_tab where (LogType = 120) and (Seq =
1);
**** 11:52:22 UTY0815 MLOAD session(s) connected: 150.
**** 11:52:22 UTY0817 MultiLoad submitting the following request:
BEGIN MLOAD b.EMP,b.EMP1 WITH INTERVAL;
**** 11:52:23 UTY0817 MultiLoad submitting the following request:
Select NULL from b.mload_log_tab where (LogType = 130) and (Seq =
1) and (MloadSeq = 20);
**** 11:52:23 UTY0832 This MultiLoad import task cannot proceed: an unexpected MultiLoad
phase, data acquisition, was reported by the RDBMS.
========================================================================
= =
= Logoff/Disconnect =
= =
========================================================================
**** 11:52:36 UTY6212 A successful disconnect was made from the RDBMS.
**** 11:52:36 UTY2410 Total processor time used = '2.69366 Seconds'
. Start : 11:51:44 - SAT JAN 15, 2011
. End : 11:52:36 - SAT JAN 15, 2011
. Highest return code encountered = '12'.

Getting the above error.Please help
Junior Contributor

Re: Multiload error

You probably dropped some Work-/Error-/Logtables.
You should drop all of those and then drop the target tables, too or run an RELEASE MLOAD.

LAYOUT is a part of the IMPORT command, so remove the semicolon.
Remove also the semicolon after the first APPLY.

.dml label emp1tab;
UPDATE b.EMP1 SET SALARY= :SALARY+2000 ;

This will fail with an "illegal DML statement", because you have to use the table's PI in the WHERE-condition. And you should be glad it doesn't work, you would update all the rows in the table once per input row.

The format of your import file is not "TEXT", it's VARTEXT, which needs all FIELDs as VARCHAR instead of CHAR.

Dieter
Enthusiast

Re: Multiload error

deleteed the work/error/log table.
relseased the lock from target table.
ran it again. It is working fine.

Thanks
Enthusiast

Re: Multiload error

Am trying to laod a table with MLOAD connection through inforamtica.Am getting below error

"Error: External loader process [5440016] exited with error [12]"

Loder log is not getting created.

Can anyone please help.