Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 22 Oct 2009 @ 12:48:17 GMT


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


Subj:   Bteq Import problem, or is it an Export problem?
 
From:   David Clough

We are trying to Import data into a table on a Linux environment but encountering the following error:-

     *** Starting Row 0 at Wed Oct 21 11:54:47 2009

     *** Error: Import data record not terminated with LF or CF
                using record size of 0 !
     *** Warning: Out of data.
     *** Finished at Wed Oct 21 11:54:47 2009

First we have exported the data on Linux using the following bteq script:-

     .Logon $TDPID/$ENV$DBASEU,$DBASEP;

     .SET SESSION CHARSET 'UTF8';
     .SET ERROROUT STDOUT;

     .export DATA FILE=$OUTTMP

       SELECT         DDH_SDL_NR (INTEGER)
                     ,DDH_DATABASE_NM (CHAR(20))
                     ,DDH_RUNSTART_TD (TIMESTAMP(0))
                     ,DDH_RUNEND_TD (TIMESTAMP(0))

       FROM          ${ENV}${TARGET_DB}.DDL_LOG_V01;

     .If Errorcode <> 0 then .Exit 12;

     .EXPORT RESET;

Then we ran the following bteq script to import the file produced from above from the same environment.

     .Sessions 4
     .SET SESSION CHARSET 'UTF8'
     .Logon $TDPID/$ENV$DBASEU,$DBASEP;
     .SET ERROROUT STDOUT;

     /*
     ##########################################################################
     */

     .Import DATA FILE=${data_path}/${filename}
     .Quiet on
     .Repeat *
     Using    ( DDH_SDL_NR (INTEGER)
               ,DDH_DATABASE_NM (CHAR(20))
               ,DDH_RUNSTART_TD (TIMESTAMP(0))
               ,DDH_RUNEND_TD (TIMESTAMP(0)))

     INSERT INTO ${ENV}${WORK_DB}.DDL_LOG_W01
                 ( DDH_SDL_NR
                  ,DDH_DATABASE_NM
                  ,DDH_RUNSTART_TD
                  ,DDH_RUNEND_TD )
     VALUES      ( :DDH_SDL_NR
                  ,:DDH_DATABASE_NM
                  ,:DDH_RUNSTART_TD
                  ,:DDH_RUNEND_TD );

     .Exit 0;

When running the Import we get the error message mentioned at the top of the email.

Please can anyone help why we get this error ?


Regards

David Clough
Database Developer
Database Design Group



     
  <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