07-11-2012 02:42 PM
I have this block of code which creates a bunch of files and formats them. I would like to email these files one at a time, how would i do that?
filename=cats('C:\Documents and Settings\user\Desktop, \block',filenum,'.txt');
file v_id filevar=filename ;
put '(' @ ;
do _n_=1 to &max while (not eof);
set v_id end=eof;
if _N_>1 then put ',' @;
put "'" vendorid +(-1) "'" ;
if eof then stop;
07-12-2012 01:12 AM
Read up on the EMAIL engine of the FILE statement.
You might want to add a statement to your previous step to save the final FILENUM variable value into a macro variable that might make it easier to generate the right number of attachments to the emails.
To create the macro variable FILENUM add this line above the current IF EOF line.
if eof then call symput('filenum',filenum);