<?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 How Do I Use Yesterday's Date as a file name in PROC EXPORT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278202#M58847</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to write a macro to get yesterday's date and use it as part of a file name in my PROC EXPORT code.&lt;/P&gt;&lt;P&gt;Desired file name would include the date in DATE9. format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA=Work.Output&lt;BR /&gt;OUTFILE="/sas/Applicable Claims &amp;amp;TEST..CSV"&lt;BR /&gt;DBMS=CSV REPLACE;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of my TEST macros that I've tried (not on the same run):&lt;/P&gt;&lt;P&gt;%let TEST= %sysfunc(%eval(Today()-1),DATE9.);&lt;BR /&gt;%let TEST= %eval(TODAY()-1);&lt;BR /&gt;%let TEST= %put %sysfunc(putn(%eval(%sysfunc(today())-1),date9.));&lt;BR /&gt;%let TEST= %put %sysfunc(intnx(day,%sysfunc(today()),-1),date9.);&lt;BR /&gt;%let TEST= %put %eval(%sysfunc(today())-1);&lt;BR /&gt;%let TEST = %eval(%sysfunc(today(),)-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing free-lance code in EG 9.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2016 14:56:51 GMT</pubDate>
    <dc:creator>bsbrogs05</dc:creator>
    <dc:date>2016-06-17T14:56:51Z</dc:date>
    <item>
      <title>How Do I Use Yesterday's Date as a file name in PROC EXPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278202#M58847</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to write a macro to get yesterday's date and use it as part of a file name in my PROC EXPORT code.&lt;/P&gt;&lt;P&gt;Desired file name would include the date in DATE9. format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA=Work.Output&lt;BR /&gt;OUTFILE="/sas/Applicable Claims &amp;amp;TEST..CSV"&lt;BR /&gt;DBMS=CSV REPLACE;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of my TEST macros that I've tried (not on the same run):&lt;/P&gt;&lt;P&gt;%let TEST= %sysfunc(%eval(Today()-1),DATE9.);&lt;BR /&gt;%let TEST= %eval(TODAY()-1);&lt;BR /&gt;%let TEST= %put %sysfunc(putn(%eval(%sysfunc(today())-1),date9.));&lt;BR /&gt;%let TEST= %put %sysfunc(intnx(day,%sysfunc(today()),-1),date9.);&lt;BR /&gt;%let TEST= %put %eval(%sysfunc(today())-1);&lt;BR /&gt;%let TEST = %eval(%sysfunc(today(),)-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing free-lance code in EG 9.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 14:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278202#M58847</guid>
      <dc:creator>bsbrogs05</dc:creator>
      <dc:date>2016-06-17T14:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Use Yesterday's Date as a file name in PROC EXPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278214#M58849</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
call symput('test',put(date()-1,date9.));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jun 2016 15:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278214#M58849</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-17T15:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Use Yesterday's Date as a file name in PROC EXPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278215#M58850</link>
      <description>&lt;P&gt;And a tip: DO NO USE BLANKS IN FILENAMES!&lt;/P&gt;
&lt;P&gt;Use underlines instead.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 15:12:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-Do-I-Use-Yesterday-s-Date-as-a-file-name-in-PROC-EXPORT/m-p/278215#M58850</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-17T15:12:26Z</dc:date>
    </item>
  </channel>
</rss>

