Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Aug 2009 @ 19:16:22 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Mload issues with variable length records
 
From:   Millar, Timothy

Sorry for the length, but here goes....

I'm using Multiload Release MLOD.07.08.00.000. and I'm attempting to load a file with variable length single field into a single column in Teradata and having no success. The file was exported from Excel which led me to use FORMAT TEXT, but mload gave the following error:

(I've only included relevant lines in the script)

     .LAYOUT DMS_text;
       .FIELD DMS_DATA  1  CHAR(71);
     .DML LABEL INS_DMS_1t
         IGNORE DUPLICATE ROWS;
     INSERT INTO GRP_REVRECONC.DMS_1
            ( DMS_REC )
     VALUES ( :DMS_DATA );
     .IMPORT INFILE C:\dev\inv\files\1DS4x.TXT
       FORMAT TEXT
       LAYOUT DMS_text
       APPLY INS_DMS_1t;
     .END MLOAD;
     The table is defined thus:
     CREATE MULTISET TABLE DMS_1 ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT
          (
           DMS_REC CHAR(71) CHARACTER SET LATIN CASESPECIFIC) PRIMARY INDEX ( DMS_REC );

     UTY4205 Record '1' of file 'C:\dev\inv\files\1DS4x.TXT' is too short by '54' bytes.
     UTY1803 Import processing statistics
     .                                       IMPORT  1     Total thus far
     .                                       =========     ==============
     Candidate records considered:........           1.......           1
     Apply conditions satisfied:..........           0.......           0

This is the first record in the file - only 17 + 2 bytes (because it ends in X'0D0A'):

     4163525 T OFRT 39

So then I tried to use FORMAT UNFORMAT, but I got this error:

     UTY4205 Record '24604' of file 'C:\dev\inv\files\1DS4x.TXT' is too short by '15' bytes.
     UTY1803 Import processing statistics
     .                                       IMPORT  1     Total thus far
     .                                       =========     ==============
     Candidate records considered:........       24604.......       24604
     Apply conditions satisfied:..........       24603.......       24603

Here's the data in those records (both records considered were 30 + 2 bytes)

     Rec#      Data
     24603  4163921950 ILC DONL 64 0 03 28
     24604  4163921951 ILC HOST 03 1 11 30

     .LAYOUT DMS_unfmt;
       .FIELD DMS_DATA  1  CHAR(71);
     .DML LABEL INS_DMS_1u
         IGNORE DUPLICATE ROWS;
     INSERT INTO GRP_REVRECONC.DMS_1
            ( DMS_REC )
     VALUES ( :DMS_DATA );
     .IMPORT INFILE C:\dev\inv\files\1DS4x.TXT
       FORMAT UNFORMAT
       LAYOUT DMS_unfmt
       APPLY INS_DMS_1u;
     .END MLOAD;

Is there a bug in this release of Multiload? Upgrading is not an option, so any workaround suggestions would be helpful.


Thanks,

Tim



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023