Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 10 May 2005 @ 19:47:38 GMT


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


Subj:   Batch processing using BTEQ
 
From:   Kirunchyk, Dave (D.J.)

We recently upgraded our Teradata environment to V2R5. When we run a batch process using a flatfile, we encounter a possible error situation. I'll explain.

We have a base table which is aggregated into a summary table. We use a input file with current month-year, prior month-year, and continent1, and continent2.

When we run the code below, we get unpredictable results. The data does not get fully loaded into the aggregate table. Has anyone else received these types of errors when running a batch process using an input parameter card?

     Sample code:
     .IMPORT DATA DDNAME=INFILE
     .REPEAT *
      USING
        PYRMO         (CHAR(06))                     <== PRIOR MONTH
      , CYRMO         (CHAR(06))                     <== CURRENT MONTH
      , CONT1         (CHAR(02))                     <== CONTINENT 1
      , CONT2         (CHAR(02))                     <== CONTINENT 2
      , FILLER        (CHAR(60))
     INSERT INTO tablea
     SELECT P1.PRODUCT
             ,A5.COUNTRY
             ,A5.PERIOD
             ,SUM(A5.AMOUNT)
     FROM tablea5 A5
         ,tablep1 P1
         ,tablef4 F4
     WHERE A5.PREFIX    = P1.PREFIX
       AND A5.BASE      = P1.BASE
       AND A5.SUFFIX    = P1.SUFFIX
       AND A5.COUNTRY   = F4.COUNTRY_ISO3_C
       AND A5.PERIOD    IN (:PYRMO, :CYRMO)           <== USING INPUT FILE
     PARAMETERS
       AND F4.CONTINENT IN (:CONT1, :CONT2)           <== USING INPUT FILE
     PARAMETERS
     GROUP BY 1,2,3
     -------------------------

Dave Kirunchyk
IBIS - International Business Information Systems



     
  <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