Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Mon, 10 Dec 2002 @ 00:45:24 GMT


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


Subj:   Re: Has anybody run mload script thru' FoxPro program ??
 
From:   Dwight Etheridge

Hi,

Maybe this test I built will yield something... Built on Windows XP. It directs the file records to the appropriate insert(s) via the .import/apply logic.

     /* test files */

     type ./data/file1.dat
     R1DWIGHT
     R2DWIGHT
     R3DWIGHT

     type ./data/file2.dat
     R4DWIGHT
     R5DWIGHT
     R6DWIGHT

     type ./data/file3.dat
     R7DWIGHT
     R8DWIGHT
     R9DWIGHT

     /* bteq setup */

     ct vartec1
     ( col1 char(2)
      ,col2 char(6) );
     ct vartec2
     ( col1 char(2)
      ,col2 char(6) );
     ct vartec3
     ( col1 char(2)
      ,col2 char(6) );
     .quit

     /* multiload script */

     .logon dbc/equitree,******;
     .logtable equitree.lt_vartec;
     .begin mload tables vartec1
                        ,vartec2
                        ,vartec3

       checkpoint 100 errlimit 1 sessions 10 ;

     .layout globlay;
     .field recid * char(2);
     .field usern * char(6);

     .dml label t1_ins;
      insert into vartec1 values (:recid, :usern );

     .dml label t2_ins;
      insert into vartec2 values (:recid, :usern );

     .dml label t3_ins;
      insert into vartec3 values (:recid, :usern );

     .import infile ./data/file1.dat format text layout globlay apply t1_ins apply t3_ins;
     .import infile ./data/file2.dat format text layout globlay apply t2_ins apply t3_ins;
     .import infile ./data/file3.dat format text layout globlay apply t3_ins;

     .end mload;
     .logoff;

     mload 

 
 
 
 


     
  <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: 28 Jun 2020