tarheels058
tarheels058

Reputation: 469

Teradata Multiload Script stuck at LOGON

I made this mload script and it gets stuck at LOGON. I have access to the db and similar logons work fine in fastload scripts.

Here is the script:

.LOGTABLE UD821.FRC_RPT_PERD_Log;
.LOGON oneview/uid,pw;



.BEGIN IMPORT MLOAD TABLES UD821.FRC_RPT_PERD SESSIONS 5;




.LAYOUT InputFile_layout;

       .field PERD_END_RPT_DT   (VARCHAR(20));
       .field RPT_PERD_TYPE_CD  (VARCHAR(20));
       .field PERD_NM        (VARCHAR(30));
       .field QTR_NUM           (VARCHAR(2));
       .field YEAR_NUM          (VARCHAR(4));
       .field RPT_PERD_TYPE_NM  (VARCHAR(10));
       .field DATA_VLDTN_IND    (VARCHAR(1));
       .fieldEDW_PUBLN_ID      (VARCHAR(18));

.DML LABEL FRC_RPT_PERD_INSERT;


.INSERT INTO UD821.FRC_RPT_PERD ( PERD_END_RPT_DT, RPT_PERD_TYPE_CD, PERD_NM, QTR_NUM, YEAR_NUM, RPT_PERD_TYPE_NM,
                          DATA_VLDTN_IND, EDW_PUBLN_ID )
    VALUES ( 

CASE WHEN Substr(PERD_END_RPT_DT,3,1) = '/'
AND Substr(PERD_END_RPT_DT,6,1) = '/'
THEN Substr(PERD_END_RPT_DT,7,4)||'-'||Substr(PERD_END_RPT_DT,1,2)||'-' ||Substr(PERD_END_RPT_DT,4,2)

WHEN Substr(PERD_END_RPT_DT,2,1) = '/'
AND Substr(PERD_END_RPT_DT,5,1) = '/'
THEN Substr(PERD_END_RPT_DT,6,4)||'-0'||Substr(PERD_END_RPT_DT,1,1)||'-' ||Substr(PERD_END_RPT_DT,3,2)

WHEN Substr(PERD_END_RPT_DT,2,1) = '/'
AND Substr(PERD_END_RPT_DT,4,1) = '/'
THEN Substr(PERD_END_RPT_DT,5,4)||'-0'||Substr(PERD_END_RPT_DT,1,1)||'-0' ||Substr(PERD_END_RPT_DT,3,1)

WHEN Substr(PERD_END_RPT_DT,3,1) = '/'
AND Substr(PERD_END_RPT_DT,5,1) = '/'

THEN Substr(PERD_END_RPT_DT,6,4)||'-'||Substr(PERD_END_RPT_DT,1,2)||'-0' ||Substr(PERD_END_RPT_DT,4,1)
ELSE PERD_END_RPT_DT
END (Date,Format 'yyyy-mm-dd'),, :RPT_PERD_TYPE_CD, :PERD_NM, :QTR_NUM, :YEAR_NUM, :RPT_PERD_TYPE_NM,
                          :DATA_VLDTN_IND, :EDW_PUBLN_ID ) ;

.import infile C:\Documents and Settings\bkp343\Desktop\FRC_RPT_PERD.csv
 format vartext  ','
 display errors
 nostop
 layout InputFile_Layout
 apply FRC_RPT_PERD_INSERT;

.end mload;
 .logoff;

Is there something obviously wrong here? It just hangs at 0002 LOGON.

Upvotes: 0

Views: 1693

Answers (2)

Joe Atkinson
Joe Atkinson

Reputation: 1

We just experienced this exact problem while trying to run the script remotely over a DSL line. The fix was to use the IP address rather than the alias. Apparently there is something that hangs in the LDAP authentication at slower DSL speeds. The same script worked on a faster remote connection.

Upvotes: 0

tako
tako

Reputation: 11

I had similar problem so I landed here. In my case the solution was trivial: instead of running my mload script: 'mload -b < script.mload' (correct) I tried 'mload -b script.mload' (incorrect). The first is correct

Upvotes: 1

Related Questions