<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need to send report to a shared drive instead of e mail in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315961#M68970</link>
    <description>&lt;P&gt;If I understand, ypur general flow is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; - &amp;nbsp;read input file(s) and create report file&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; - &amp;nbsp;copy the report file to destination-1 on &lt;STRONG&gt;same server&lt;/STRONG&gt;, with a name &lt;STRONG&gt;including date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; - &amp;nbsp;&lt;SPAN&gt;copy the report file to destination-2 on &lt;STRONG&gt;other server,&lt;/STRONG&gt; &lt;STRONG&gt;without the date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;use similar code to copy files adapting (changing) the target file refence:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;While writing to the same server the referece is like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- D:\pathname\filename.ext &amp;nbsp; - on windows &amp;nbsp;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- /pathname/filename &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - on unix or linux&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;to write on remote server -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- you need permission to write to the specific folder&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- your reference to the file shoul be like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="code"&gt;filename dest3 &lt;STRONG&gt;ftp&lt;/STRONG&gt; 'c:\remote\test.dat' &lt;STRONG&gt;host=&lt;/STRONG&gt;'winnt.pc' &lt;STRONG&gt;user=&lt;/STRONG&gt;'bbailey' &lt;STRONG&gt;pass=&lt;/STRONG&gt;'xxxx' recfm=v;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;for more details link to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#p0v0ijxl1k6d4bn16cshtic7u4i3.htm" target="_self"&gt;https://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#p0v0ijxl1k6d4bn16cshtic7u4i3.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see examples 3 and 6.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2016 15:03:18 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-12-01T15:03:18Z</dc:date>
    <item>
      <title>Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315525#M68848</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was using e mail to sent my reports to the users. Now a new system is in place and I need to send the report to one shared drive instead of mail. Here I cant do a simple export because I have particular templates for different reports. I was using one e mail macro to pick the reports from a folder and sent email. I am attching that macro with this. Please let me know if there is any way to sent it to a folder insted of using mail .Thanks.Manesh&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro emailreport(path=, name=, ext=, date=, format=, to=, cc=, msg=, sig=, attach=);
FILENAME mail EMAIL 'nul' ;
DATA _NULL_;
FILE mail ;

subject = &amp;amp;name;
tolist = tranwrd(trim('(' || quote(&amp;amp;to) || ')'), ';', '" "');
cclist = tranwrd(trim('(' || quote(&amp;amp;cc) || ')'), ';', '" "');
msg=&amp;amp;msg;
sig=&amp;amp;sig;
datestr = put(&amp;amp;date, &amp;amp;format);
attachment = &amp;amp;path || &amp;amp;name || ' ' || datestr || '.' || &amp;amp;ext;

put '!EM_TO!' tolist;
put '!EM_CC!' cclist;
put '!EM_SUBJECT!' subject;
if (&amp;amp;attach) then
	put '!EM_ATTACH!' attachment;
if (missing(msg) = 0) then
	put msg;
if (missing(sig) = 0) then
	put sig;
/*put '!EM_SEND!';*/
run;
%mend emailreport;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315525#M68848</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-11-30T14:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315529#M68851</link>
      <description>&lt;P&gt;Well,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;Here I cant do a simple export because I have particular templates for different reports"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Not sure what you mean here. &amp;nbsp;Templates are a SAS item used at report creation and have nothing to do with where you store output files, so not sure why this would be an issue. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You should simply be able to put the url to the output path in the creation of your outputs - this is the simple standard method of creating output files.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315529#M68851</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-30T14:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315538#M68856</link>
      <description>&lt;P&gt;One of the generic approaches to wrap ANY output generator in an ODS "sandwich" to provide destination and file type. Trivial example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS PDF file="c:\myreportfolder\myreport.pdf";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=mydatafile;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ods pdf close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sends the output of the proc print or any other procedures between the ODS PDF file and ODS PDF Close statements to a PDF document in the specified location.&lt;/P&gt;
&lt;P&gt;There are many different ODS types and the different file types have additional options. The file location must be one that your SAS installation has write permissions to so the path may need some tweaking if you use a SAS server as the path would be relative to the server.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315538#M68856</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-30T14:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315539#M68857</link>
      <description>&lt;P&gt;Create you report file in its final name &amp;nbsp;- either directly on the shared drive or copy the file created to shared drive&lt;/P&gt;
&lt;P&gt;and use the email - without attachment - just to acknowledge the user(s) that the file is ready.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315539#M68857</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-30T14:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315590#M68868</link>
      <description>&lt;P&gt;Hi Shmuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I can create&amp;nbsp;the report&amp;nbsp;in some other folder and copy that&amp;nbsp;to the shared drive &amp;nbsp;as you suggested , I have one doubt over here while copying the respective file I dont need the date string with the report (normally I create the report with date string )the report in the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The template&amp;nbsp;name will be &amp;nbsp;&lt;STRONG&gt;58 reportname&lt;/STRONG&gt;.&amp;nbsp;&amp;nbsp;We load the data in to the template and create the report named below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the report name will &lt;STRONG&gt;58 reportname 2016-11-18 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And while sending the report to shared drive I dont need the date string it should be static . I cant create with out date string While creating the report.because If i create the report with out date string the template will overwrite. Please give me some sollution&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315590#M68868</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-11-30T16:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315601#M68872</link>
      <description>&lt;P&gt;I assume you want both copies of the reportnames - the one with the datestring and the other in the shared drive without it.&lt;/P&gt;
&lt;P&gt;When you say&amp;nbsp;&lt;STRONG&gt;58 reportname &lt;/STRONG&gt;- do you mean 58 different files, each with its name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you write to the shared drive from SAS ?&lt;/P&gt;
&lt;P&gt;If yes then run next code for each of the 58 report names:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in "&amp;amp;pat.&amp;amp;name.&amp;amp;datestring..&amp;amp;ext"; 
filename out "SharedDriveDirectory.&amp;amp;name..&amp;amp;ext";&lt;BR /&gt;data _NULL_;&lt;BR /&gt;   infile in truncover;&lt;BR /&gt;   input _infile_ $;&lt;BR /&gt;   file out;&lt;BR /&gt;   put _infile_;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;you can do it with a macro, with just one argumnet: &amp;amp;name&lt;BR /&gt;as in:&lt;BR /&gt;%macro copy_file(namex);&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;filename in "&amp;amp;path.&lt;STRONG&gt;&amp;amp;namex&lt;/STRONG&gt;.&amp;amp;datestring..&amp;amp;ext"; 
   filename out "SharedDriveDirectory.&lt;STRONG&gt;&amp;amp;namex.&lt;/STRONG&gt;.&amp;amp;ext";  /* adatpt shared folder name */&lt;BR /&gt;   data _NULL_;&lt;BR /&gt;      infile in truncover;&lt;BR /&gt;      input _infile_ $;&lt;BR /&gt;      file out;&lt;BR /&gt;      put _infile_;&lt;BR /&gt;   run;&lt;BR /&gt;%mend copy_file;&lt;BR /&gt;%copy_file(report1);&lt;BR /&gt;%copy_file(report2);&lt;BR /&gt;etc.&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315601#M68872</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-30T16:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315913#M68958</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the code but not able to achieve the result. your assumption was correct I export the report to one drive . The drive will have a template for the reports and I use the attached macro to do the export of the report. Its not 56 reports that is report number , all the report will be having a report number.&amp;nbsp;Now my client need to send one copy of the report to another folder with out the date string. I have tried with X command&amp;nbsp;and the cold you have provided and was not able to get it.&amp;nbsp;I attaching the&amp;nbsp;export report macro&amp;nbsp;It will be a&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let rptpath= path;
%let rptname='56 rptname';
%let rptdate=today();
%let rptdatefmt = YYMMDDd10.;


%macro exportreport(path=, name=, date=, format=, data=);
data _NULL_;

src=&amp;amp;path || &amp;amp;name || '.xlsx';
src2 = &amp;amp;path || &amp;amp;name || '.xls';

dest = &amp;amp;path || &amp;amp;name || ' ' || put(&amp;amp;date, &amp;amp;format) || '.xlsx';
dest2 = &amp;amp;path || &amp;amp;name || ' ' || put(&amp;amp;date, &amp;amp;format) || '.xls';

if (fileexist(src)) then
	do;
		call system('copy ' || quote(src) || ' ' || quote(dest));
		call symput('_exportreportpathname', dest);
	end;
 else if (fileexist(src2)) then
	do;
		call system('copy ' || quote(src2) || ' ' || quote(dest2));
		call symput('_exportreportpathname', dest2);
	end;

run;

%exportfile(pathname=&amp;amp;_exportreportpathname., data=&amp;amp;data);
%mend exportreport;

%exportreport(path=&amp;amp;rptpath, name=&amp;amp;rptname, date=&amp;amp;rptdate, format=&amp;amp;rptdatefmt, data=FINAL_OUT);


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;great help&amp;nbsp;if I can get a&amp;nbsp;similar macro to sent&amp;nbsp;export the report with out date string to another folder.thanks&amp;gt;manesh&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 12:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315913#M68958</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-12-01T12:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315934#M68962</link>
      <description>&lt;P&gt;Your lines:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;dest = &amp;amp;path || &amp;amp;name || ' ' || put(&amp;amp;date, &amp;amp;format) || '.xlsx'; &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;dest2 = &amp;amp;path || &amp;amp;name || &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;' ' ||&lt;/STRONG&gt; &lt;STRONG&gt;put(&amp;amp;date, &amp;amp;format) ||&lt;/STRONG&gt;&lt;/FONT&gt; '.xls';&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;=============================&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is DEST2 - the shared drive to have the report &lt;U&gt;without&lt;/U&gt; the date ?&lt;/P&gt;
&lt;P&gt;If so - you should just remove the &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;red&lt;/STRONG&gt; &lt;/FONT&gt;part ?!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;===&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;What are src, src2 files - that is not output report of your first macro ?! where is the date ?&lt;/FONT&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 13:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315934#M68962</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T13:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315937#M68963</link>
      <description>&lt;P&gt;No dest2 is for if &amp;nbsp;the sheet &lt;STRONG&gt;xls&lt;/STRONG&gt; format.This code is only for exporting the report in to one folder and Now I&amp;nbsp;need to send it from that folder to&amp;nbsp;the shared drive&amp;nbsp;with out the date string. Its a different server from there my users can access the report.Previoulsy&amp;nbsp;I use to send this throu e mail , we are now trying to get rid of the e mail part .&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 13:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315937#M68963</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-12-01T13:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315938#M68964</link>
      <description>there is some problem with the forum editor.&lt;BR /&gt;the red part is    : '  ' || put(&amp;amp;date, &amp;amp;format) ||</description>
      <pubDate>Thu, 01 Dec 2016 13:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315938#M68964</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T13:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315947#M68965</link>
      <description>&lt;P&gt;src=&lt;FONT face="Courier New"&gt;&amp;amp;path || &amp;amp;name || &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New"&gt;'.xlsx'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;src2 = &lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&amp;amp;path || &amp;amp;name || &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New"&gt;'.xls'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;path=&amp;amp;rptpath, name=&amp;amp;rptname . This &amp;amp;rptpath and &amp;amp;rptname is the output for the first %let macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 14:12:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315947#M68965</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-12-01T14:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send report to a shared drive instead of e mail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315961#M68970</link>
      <description>&lt;P&gt;If I understand, ypur general flow is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; - &amp;nbsp;read input file(s) and create report file&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; - &amp;nbsp;copy the report file to destination-1 on &lt;STRONG&gt;same server&lt;/STRONG&gt;, with a name &lt;STRONG&gt;including date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; - &amp;nbsp;&lt;SPAN&gt;copy the report file to destination-2 on &lt;STRONG&gt;other server,&lt;/STRONG&gt; &lt;STRONG&gt;without the date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;use similar code to copy files adapting (changing) the target file refence:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;While writing to the same server the referece is like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- D:\pathname\filename.ext &amp;nbsp; - on windows &amp;nbsp;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- /pathname/filename &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - on unix or linux&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;to write on remote server -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- you need permission to write to the specific folder&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- your reference to the file shoul be like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="code"&gt;filename dest3 &lt;STRONG&gt;ftp&lt;/STRONG&gt; 'c:\remote\test.dat' &lt;STRONG&gt;host=&lt;/STRONG&gt;'winnt.pc' &lt;STRONG&gt;user=&lt;/STRONG&gt;'bbailey' &lt;STRONG&gt;pass=&lt;/STRONG&gt;'xxxx' recfm=v;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;for more details link to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#p0v0ijxl1k6d4bn16cshtic7u4i3.htm" target="_self"&gt;https://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#p0v0ijxl1k6d4bn16cshtic7u4i3.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see examples 3 and 6.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 15:03:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-send-report-to-a-shared-drive-instead-of-e-mail/m-p/315961#M68970</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T15:03:18Z</dc:date>
    </item>
  </channel>
</rss>

