Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 18 Nov 2004 @ 15:54:06 GMT


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


Subj:   Re: Mailing unix file after BTEQ/FastExport
 
From:   Joseph Massena

Here is an example in Unix.

     if [[ -f ${SQLDIR}/output_file_name_${TIMESTAMP}.csv ]]
     then
         export FNAME1=${SQLDIR}/output_file_name_${TIMESTAMP}.csv
         export TO="[email protected]"
         export REPLY=${TO%%,*}

         ( cat <<-MSGTXT

         Find the file ${FNAME1} attached.

         MSGTXT
         uuencode ${FNAME1} `basename ${FNAME1}` ) | \
                 mailx -s "Attached File sent $(date)" -r ${REPLY} ${TO}

     else
         email /dev/null [email protected] "ERROR: File Not Created"
     fi


     
  <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