Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 21 Sep 2001 @ 16:23:48 GMT


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


Subj:   Re: Exporting Data from Teradata into a Unix Pipe
 
From:   Wayne Moran

Here is a cut from an OUTMOD that I used to write my output to the UNIX compress command using a pipe.

   /* If compress files then open output file using pipe to compress */

   if (Compress_Files == 1 )
    {
     sprintf (command,"compress -c > %s ", filename_lst[curr_write_file_ctr].fname);

     if ((file1_fp=popen(command,"w")) == NULL)
      {
       fprintf(stderr,"%s %d:Bad Open on file <%s>,errno=%d\n", __FILE__,__LINE__,filename_lst[curr_write_file_ctr].fname,errno);

       fflush(stderr);
       dw_kill_parnt_child();
       exit(BAD_OPEN);
      }

I hope this helps.

Wayne N. Moran



     
  <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