<?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: Proc Export - .txt being excluded from file name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650911#M195221</link>
    <description>&lt;P&gt;Oh wow! Such a silly mistake on my part. Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 20:00:39 GMT</pubDate>
    <dc:creator>Krysia24</dc:creator>
    <dc:date>2020-05-26T20:00:39Z</dc:date>
    <item>
      <title>Proc Export - .txt being excluded from file name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650049#M194914</link>
      <description>&lt;P&gt;Hello SAS Users! I am using a proc export step to export a txt file; however, the output keeps exporting without the ".txt" file extension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA= survey&lt;BR /&gt;OUTFILE= "\\fakepath\survey_&amp;amp;today.txt"&lt;BR /&gt;DBMS= tab&lt;BR /&gt;REPLACE;&lt;BR /&gt;PUTNAMES=YES;&lt;BR /&gt;RUN ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output file looks like this: "survey_22May2020" without the ".txt" extension. So I have to open it in Notepad and save as a .txt as a manual workaround... Thoughts?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 23:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650049#M194914</guid>
      <dc:creator>Krysia24</dc:creator>
      <dc:date>2020-05-22T23:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - .txt being excluded from file name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650051#M194915</link>
      <description>&lt;P&gt;You need to have a '.' after the macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC EXPORT DATA= survey
OUTFILE= "\\fakepath\survey_&amp;amp;today..txt"
DBMS= tab
REPLACE;
PUTNAMES=YES;
RUN ;

 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 May 2020 00:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650051#M194915</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-05-23T00:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - .txt being excluded from file name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650106#M194953</link>
      <description>&lt;P&gt;SAS uses a period to denote the end of a macro variable in code.&lt;/P&gt;
&lt;P&gt;Example if you want to append an _ to the end of a macro variable you use something like:&lt;/P&gt;
&lt;PRE&gt;%let base = abc;
%let new = &amp;amp;base._;

%put &amp;amp;new.&lt;/PRE&gt;
&lt;P&gt;If you do not have the period the above example statement&lt;/P&gt;
&lt;PRE&gt;%let new =&amp;amp;base_;&lt;/PRE&gt;
&lt;P&gt;will generate an error because the macro variable Base is not terminated and you have told SAS to use a macro variable named base_.&lt;/P&gt;
&lt;P&gt;So when you need to have a period as part of the resolved value after a macro variable you use two.&lt;/P&gt;
&lt;P&gt;The same thing is needed when using any of The of the SAS syntax elements like Library.dataset. If both your library and data set names are stored in macro variables the proper reference would be&amp;nbsp; &amp;amp;library..&amp;amp;dataset.&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 19:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650106#M194953</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-23T19:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export - .txt being excluded from file name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650911#M195221</link>
      <description>&lt;P&gt;Oh wow! Such a silly mistake on my part. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 20:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Export-txt-being-excluded-from-file-name/m-p/650911#M195221</guid>
      <dc:creator>Krysia24</dc:creator>
      <dc:date>2020-05-26T20:00:39Z</dc:date>
    </item>
  </channel>
</rss>

