Access module error while running MLOAD

Tools
Enthusiast

Access module error while running MLOAD

Hi,

I'm getting access module error while running mload script from command prompt.
FYI- I'm using a demo version of teradata V2R5.
The text file is as simple as
aaxabcdddddaaaaa
and the table is empty.

Here is the ,message i'm getting................

Is this beacuse the MLOAD is not able to read the file which needs to be MLOADed?

**********************************************************************

C:\Documents and Settings\arnabdas>mload<>
========================================================================
= =
= MultiLoad Utility Release MLOD.07.06.02.000 =
= Platform WIN32 =
= =
========================================================================
= =
= Copyright 1990-2002, NCR Corporation. ALL RIGHTS RESERVED. =
= =
========================================================================
**** 16:41:37 UTY2411 Processing start date: WED JUL 12, 2006
========================================================================
= =
= Logon/Connection =
= =
========================================================================
0001 .LOGTABLE retail.employee1_mlog;

0002 .logon demotdat/anjali,;
**** 16:41:37 UTY8400 Default character set: ASCII
**** 16:41:37 UTY8400 Maximum supported buffer size: 64K
**** 16:41:37 UTY6211 A successful connect was made to the RDBMS.
**** 16:41:37 UTY6217 Logtable 'retail.employee1_mlog' has been created.
========================================================================
= =
= Processing Control Statements =
= =
========================================================================

0003 DATABASE retail;
**** 16:41:37 UTY1016 'DATABASE' request successful.

0004 .BEGIN IMPORT MLOAD
TABLES employee1
WORKTABLES employee1_WT
ERRORTABLES employee1_ET
employee1_UV
ERRLIMIT 0
SESSIONS 1
TENACITY 4
AMPCHECK NONE;
========================================================================
= =
= Processing MultiLoad Statements =
= =
========================================================================

0005 .LAYOUT empl_layout;

0006 .field empno * char(3);

0007 .field name * char(3);

0008 .field address * char(5);

0009 .field phone * char(5);

0010 .DML LABEL Inserts;

0011 INSERT into retail.employee1
( empno,
name,
address,
phone
)
VALUES
(
:empno,
:name,
:address,
:phone
);

0012 .IMPORT INFILE c:\book.txt
LAYOUT empl_layout
APPLY Inserts;

0013 .END MLOAD;
========================================================================
= =
= MultiLoad Initial Phase =
= =
========================================================================
**** 16:41:37 UTY0829 Options in effect for this MultiLoad import task:
. Sessions: 1 session(s).
. Checkpoint: 15 minute(s).
. Tenacity: 4 hour limit to successfully connect load sessions.
. Errlimit: No limit in effect.
. AmpCheck: Not in effect.
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
Select NULL from retail.employee1_mlog where (LogType = 125) and (Seq = 1)
and (MloadSeq = 0);
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
Select NULL from retail.employee1_mlog where (LogType = 120) and (Seq =
1);
**** 16:41:37 UTY0812 MLOAD session(s) requested: 1.
**** 16:41:37 UTY0815 MLOAD session(s) connected: 1.
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
BEGIN MLOAD employee1;
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
INS retail.employee1_mlog (LogType, Seq, MLoadSeq)VALUES(130, 1, 10);
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
MLOAD employee1 with employee1_WT errortables employee1_ET, employee1_UV;
========================================================================
= =
= MultiLoad DML Transaction Phase =
= =
========================================================================
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
BT;
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
USING EMPNO(CHAR(3)), NAME(CHAR(3)), ADDRESS(CHAR(5)), PHONE(CHAR(5))
INSERT into retail.employee1
( empno,
name,
address,
phone
)
VALUES
(
:empno,
:name,
:address,
:phone
);
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
INS retail.employee1_mlog (LogType, Seq, MLoadSeq)VALUES(130, 1, 20);
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
ET;
========================================================================
= =
= MultiLoad Acquisition Phase =
= =
========================================================================
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
BEGIN TRANSACTION;
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
CHECKPOINT LOADING;
**** 16:41:37 UTY0817 MultiLoad submitting the following request:
CHECKPOINT LOADING;
**** 16:41:38 UTY0817 MultiLoad submitting the following request:
USING Ckpt(VARBYTE(1024)) INSERT retail.employee1_mlog (Logtype, Seq,
MLoadSeq, MLoadImpSeq, MLoadSrcSeq, MiscInt1,MiscInt2,MiscInt3,MiscInt4,
MiscInt5,MiscInt6,MiscInt7,MiscInt8,MLoadCkpt) VALUES (110, 1, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, :Ckpt);
**** 16:41:38 UTY4015 Access module error '16' received during 'read' operation
on record
number '0': 'Unexpected data format'
**** 16:41:38 UTY1803 Import processing statistics
. IMPORT 1 Total thus far
. ========= ==============
Candidate records considered:........ 0....... 0
Apply conditions satisfied:.......... 0....... 0
Candidate records not applied:....... 0....... 0
Candidate records rejected:.......... 0....... 0
========================================================================
= =
= Logoff/Disconnect =
= =
========================================================================
**** 16:41:38 UTY6212 A successful disconnect was made from the RDBMS.
**** 16:41:38 UTY2410 Total processor time used = '0.015625 Seconds'
. Start : 16:41:37 - WED JUL 12, 2006
. End : 16:41:38 - WED JUL 12, 2006
. Highest return code encountered = '12'.

C:\Documents and Settings\arnabdas>
7 REPLIES
Enthusiast

Re: Access module error while running MLOAD

Have you tried quotes around the input file?

.IMPORT INFILE 'c:\book.txt'

It looks to me like the file is not being recognized. I haven't used Mload from the PC, but based on experience with other utilities, that might be the issue.
Junior Contributor

Re: Access module error while running MLOAD

Hi Angel,
you forgot to set the format, the default is FASTLOAD, which is similar to BTEQ DATA, i.e. binary data.

.IMPORT INFILE c:\book.txt
LAYOUT empl_layout
FORMAT TEXT
APPLY Inserts;

Dieter
Enthusiast

Re: Access module error while running MLOAD

Hi,

Thanx for the response. I tried giving the quotes around and also applied the FORMAT command. It is still not working but this time it is not throwing any error. It is just not able to read/recognise the file. I have attached my MLOAD script, the errorlog and data file(book.txt).

Thanks
Angel
Enthusiast

Re: Access module error while running MLOAD

When I look at "book.txt", it looks like it doesn't have an end-of-line (carriage-return/line-feed) at the end of the first record. I don't know if this would cause the problem or not, but maybe try to go to the end of the first record and hit "return" to put the CRLF on the end of the record.
N/A

Re: Access module error while running MLOAD

From the source file, it looks like its a "file with fields of variable length and fields delimited by pipe delimiter". But in the MLOAD, there is no mention of delimiter.

Try using

FORMAT VARTEXT '|'

instead of

FORMAT TEXT

next to your IMPORT statement.

Ensure that you remove all the date/time below .LOGOFF command before running the MLOAD.

Hope this helps.

Re: Access module error while running MLOAD

Thanks a lot you all for your comments .

it did worked for me for same error above  by using

format text

and applying quotes in input file.

Regards,

dinesh agrawal

Re: Access module error while running MLOAD

Doh !  Caught me out as well.  

 

I put the FORMAT TEXT in and it worked fine.

 

Only spent two days trying everything else !  Should have looked here first :)