All Forums Tools
xcaliguyintx 1 post Joined 09/11
06 Sep 2011
MLOAD Error - An invalid statement was found before the .LOGON statement

I'm new to Teradata and am running into an error trying to execute an MLOAD process.  I keep getting the error "An invalid statement was found before the .LOGON statement" and no matter what I've tried I can't seem to get past this.  Even the people in my department who are familiar with teradata seem stumped.

Please help!!!

My script looks like this...

 

.LOGTABLE RTLTM.JCP_RWD_OFF_EARNED_CUST_LOG;

 

.LOGON TDPX/LOADJCP,;

 

.BEGIN MLOAD TABLES RTLTM.JCP_RWD_MTHLY_OFF_EARNED_CUST

 

        WORKTABLES RTLTM.JCP_RWD_OFF_EARNED_CUST_WK1

 

        ERRORTABLES RTLTM.JCP_RWD_OFF_EARNED_CUST_ER1

                    RTLTM.JCP_RWD_OFF_EARNED_CUST_ER2

        ERRLIMIT 1;

 

.LAYOUT DATAIN_REC;

 

.FIELD CUST_ID                      * CHAR(9);

.FIELD NBR_EARNED_OFFLINE_RWD_ACCTS * CHAR(3);

.FIELD TOTAL_NBR_EARNED_RWDS        * CHAR(3);

.FIELD RWD_YR                       * CHAR(4);

.FIELD RWD_MTH                      * CHAR(2);

 

.DML LABEL INSDATA;

 INSERT INTO RTLTM.JCP_RWD_MTHLY_OFF_EARNED_CUST

  VALUES

   (:CUST_ID

   ,:NBR_EARNED_OFFLINE_RWD_ACCTS

   ,:TOTAL_NBR_EARNED_RWDS

   ,:RWD_YR

   ,:RWD_MTH

  );

 

.IMPORT INFILE DATAIN

     LAYOUT DATAIN_REC

 

     APPLY INSDATA;

 

.END MLOAD;

.LOGOFF;

 

feinholz 1234 posts Joined 05/08
07 Sep 2011

Are you sure you do not have any hidden characters in the file prior to the .logtable command or in between the .logtable and the .logon command?

 

--SteveF

raj922 14 posts Joined 11/11
23 Nov 2011

.LOGON TDPX/LOADJCP,;  you need to remove ', ' in that statement and try

yoursujith 8 posts Joined 04/11
14 Dec 2011

I am also facing a similar problem and getting the same error for my fast export script. I have used the same format for another script and that is working fine. I checked this script throughly and am still not able to get where I did the mistake. Can some one please help me out here. here are the first 4 lines of the script

:

 

.LOGTABLE ABC.WORK_TBL;
.RUN FILE LOGON_FILE;

.SET MAXERROR 1;

DATABASE DBNAME;

ABC.WORK_TBL - work table

LOGON_FILE - .logon file containing .logon tdpid/Loginid,pwd;

 

Thanks

 

feinholz 1234 posts Joined 05/08
14 Dec 2011

Well, we have tried this inhouse and do not have any problems with:

 

.logtable  . . . . ;

.run file . . . . ;

.set maxerror . . . ;

database . . . ;

 

and we do not get any type of errors (assuming the file for the RUN FILE command has the .logon statement).

Please post the entire output from the job.

And the job script as well.

 

--SteveF

yougetbhargav 2 posts Joined 08/09
09 Aug 2013

Please update yor TTU to newer version, that will fix the problem , TTU 7 and older versions are may not compatable with your code.

You must sign in to leave a comment.