Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 11 Jul 2004 @ 12:15:57 GMT


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


Subj:   Re: Windows-based Fast Export Script
 
From:   Christian Schiefer

Hi,

just compile the following short C-code. It will work as a filter and cut off the 2 leading bytes ( the length indicator at the beginning of each record.

     cat fexp_data.dat | myfilter > fexp_data_without_lenght_indicator.dat

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

     #include 

     int main( int argc, char **argv )
     {
             int i, j;

             while ( ( j = getchar( ) ) !=  EOF && ( i = getchar( ) ) != EOF )
                     for ( i = ( i << 8 ) + j + 1; i--; putchar( getchar( ) ) );
     }

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

Have fun

Christian



     
  <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