<?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: How to select file with previous date in name file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772676#M245368</link>
    <description>&lt;P&gt;Just use INTNX in %SYSFUNC:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let thismonth=%sysfunc(intnx(month,%sysfunc(today()),-1),yymmn6.);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that %SYSFUNC on its own enables the use of a format, so you do not need PUTN.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2021 10:54:04 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-10-07T10:54:04Z</dc:date>
    <item>
      <title>How to select file with previous date in name file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772668#M245362</link>
      <description>&lt;P&gt;I have a function that selects a file from this month, how to change it so that it always selects from the previous one. for example now select file from september&lt;/P&gt;&lt;PRE&gt;%let thismonth=%sysfunc(putn(%sysfunc(today()),yymmn6.));&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Oct 2021 10:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772668#M245362</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-07T10:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to select file with previous date in name file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772669#M245363</link>
      <description>&lt;P&gt;Instead of providing you with a command that uses %SYSFUNC() three times nested, I will provide what I feel is a simpler method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    call symputx('lastmonth',put(intnx('month',today(),-1),yymmn6.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Oct 2021 10:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772669#M245363</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-07T10:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to select file with previous date in name file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772674#M245366</link>
      <description>Thanks ! its working ! so just need put 'lastmonth' to select file_$lastmonth ?</description>
      <pubDate>Thu, 07 Oct 2021 10:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772674#M245366</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-07T10:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to select file with previous date in name file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772676#M245368</link>
      <description>&lt;P&gt;Just use INTNX in %SYSFUNC:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let thismonth=%sysfunc(intnx(month,%sysfunc(today()),-1),yymmn6.);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that %SYSFUNC on its own enables the use of a format, so you do not need PUTN.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 10:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772676#M245368</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-07T10:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to select file with previous date in name file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772677#M245369</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/401093"&gt;@Gieorgie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks ! its working ! so just need put 'lastmonth' to select file_$lastmonth ?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;amp;lastmonth&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 10:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-select-file-with-previous-date-in-name-file/m-p/772677#M245369</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-07T10:54:45Z</dc:date>
    </item>
  </channel>
</rss>

