Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 21 May 2009 @ 10:00:50 GMT


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


Subj:   Read only first line of input file
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, May 21, 2009 02:41 -->

Hi,

What is the syntax for reading only the first lilne of a an input file? I need to read in the header record (the very first record in the file which has different layout from the detail records) of a file, then use the processing date within the header record to insert a record into a table.

     .IMPORT DATA DDNAME=INFILE
      apply insert where rec_id  = '0';

     USING
       rec_id              (CHAR(01))
      ,file_date           (CHAR(14))
      ,process_yy          (CHAR(4))
      ,process_mm          (CHAR(2))
      ,process_dd          (CHAR(2))
     ........


     INSERT INTO table_name
     (
     ........
     )
     ......

The above inserts nothing into the table (although the job ran succesfully)



     
  <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: 27 Dec 2016