<?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: using a macro in a file name in ods in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44581#M9123</link>
    <description>Clearly you have an imbedded blank character somewhere in your SAS code.  Suggest you perform some self-diagnosis by adding the stmt below to generate more SAS log output while SAS is compiling the code:&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Tue, 16 Jun 2009 13:07:40 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-06-16T13:07:40Z</dc:date>
    <item>
      <title>using a macro in a file name in ods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44577#M9119</link>
      <description>Hi,&lt;BR /&gt;
I'm trying to export a file to excel and then sent am e-mail with a link to the xls file,&lt;BR /&gt;
the name of the file contains macros for the date and time, but when I add the time macro, the file created is not recognized as an xls file.&lt;BR /&gt;
the here is the code :&lt;BR /&gt;
&lt;BR /&gt;
***************************************************&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	a=time();&lt;BR /&gt;
    dc=put (a,time5.);&lt;BR /&gt;
	dc=substr (dc,1,2)||':'||substr (dc,4,2);&lt;BR /&gt;
	call symput ('data_time',dc);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;data_time;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.test options(embedded_titles='Yes')&lt;BR /&gt;
file="&amp;amp;path\sasoutputs\tayar_untypical&amp;amp;sysdate&amp;amp;data_time..xls"&lt;BR /&gt;
style=XLSasweb;&lt;BR /&gt;
title;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.test alias="cards";&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc print data=mydblib.tayar_auth_final noobs label;&lt;BR /&gt;
var card_number&lt;BR /&gt;
	country_name&lt;BR /&gt;
    &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods _all_ close; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
filename emailmsg email &lt;BR /&gt;
     to=("sivana@gmail.com")&lt;BR /&gt;
     FROM='The SAS System &lt;RND_TEAM&gt;'&lt;BR /&gt;
         subject=cards';&lt;BR /&gt;
&lt;BR /&gt;
DATA _NULL_;&lt;BR /&gt;
FILE emailmsg;&lt;BR /&gt;
PUT ;&lt;BR /&gt;
PUT ;&lt;BR /&gt;
PUT HREF="\\netapp01\users \SasOutputs\tayar_untypical&amp;amp;sysdate&amp;amp;data_time..xls";&lt;BR /&gt;
run;&lt;BR /&gt;
 &lt;BR /&gt;
filename emailmsg;&lt;BR /&gt;
**********************************************************&lt;BR /&gt;
&lt;BR /&gt;
What can I do to solve the problem?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sivan&lt;/RND_TEAM&gt;</description>
      <pubDate>Mon, 15 Jun 2009 07:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44577#M9119</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-15T07:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: using a macro in a file name in ods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44578#M9120</link>
      <description>Choose a different character than the colon in your time-portion of your file name -- it must be compatible with file-naming strings.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 15 Jun 2009 11:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44578#M9120</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-06-15T11:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: using a macro in a file name in ods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44579#M9121</link>
      <description>Thank you!</description>
      <pubDate>Mon, 15 Jun 2009 11:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44579#M9121</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-15T11:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: using a macro in a file name in ods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44580#M9122</link>
      <description>Hi,&lt;BR /&gt;
I did what you said, but now there is a problem with the link that appears in the mail, it looks like this : &lt;BR /&gt;
&lt;BR /&gt;
HREF=. &lt;U&gt;\\netapp01\users\SasOutputs\tayar_untypial_auth_from_today\tayar_untypical15JUN09'&lt;/U&gt; 8_40.xls&lt;BR /&gt;
&lt;BR /&gt;
Seems like the second macro is not recognized as a part of the link, what can I do?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sivan

Message was edited by: sivana</description>
      <pubDate>Tue, 16 Jun 2009 05:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44580#M9122</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-16T05:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: using a macro in a file name in ods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44581#M9123</link>
      <description>Clearly you have an imbedded blank character somewhere in your SAS code.  Suggest you perform some self-diagnosis by adding the stmt below to generate more SAS log output while SAS is compiling the code:&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 16 Jun 2009 13:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-a-file-name-in-ods/m-p/44581#M9123</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-06-16T13:07:40Z</dc:date>
    </item>
  </channel>
</rss>

