<?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 Programming Help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872128#M344561</link>
    <description>&lt;P&gt;data _null_;&lt;BR /&gt;informat &lt;STRONG&gt;lastDayofTheLastMonth&lt;/STRONG&gt; yymmddn8.;&lt;BR /&gt;&lt;STRONG&gt;lastDayofTheLastMonth&lt;/STRONG&gt;=intnx('month', today() , -1, 'E');&lt;BR /&gt;put lastDayofTheLastMonth;&lt;BR /&gt;call symput('lastDayofTheLastMonth1',lastDayofTheLastMonth);&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;lastDayofTheLastMonth1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have; &lt;BR /&gt;INFILE 'Path\ScannedFiles_&amp;amp;lastDayofTheLastMonth1..txt' delimiter=',' dsd;&lt;BR /&gt;input var1 var2 var3;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to replace&amp;nbsp;lastDayofTheLastMonth1 as yyyymmdd(e.g 20230331) in infile statement, when I am running above code, it's not resolving, kindly suggest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;INFILE 'Path\ScannedFiles_&lt;FONT color="#FF0000"&gt;20230331&lt;/FONT&gt;.txt' delimiter=',' dsd;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 06:15:49 GMT</pubDate>
    <dc:creator>kumarsandip975</dc:creator>
    <dc:date>2023-04-26T06:15:49Z</dc:date>
    <item>
      <title>Programming Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872128#M344561</link>
      <description>&lt;P&gt;data _null_;&lt;BR /&gt;informat &lt;STRONG&gt;lastDayofTheLastMonth&lt;/STRONG&gt; yymmddn8.;&lt;BR /&gt;&lt;STRONG&gt;lastDayofTheLastMonth&lt;/STRONG&gt;=intnx('month', today() , -1, 'E');&lt;BR /&gt;put lastDayofTheLastMonth;&lt;BR /&gt;call symput('lastDayofTheLastMonth1',lastDayofTheLastMonth);&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;lastDayofTheLastMonth1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have; &lt;BR /&gt;INFILE 'Path\ScannedFiles_&amp;amp;lastDayofTheLastMonth1..txt' delimiter=',' dsd;&lt;BR /&gt;input var1 var2 var3;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to replace&amp;nbsp;lastDayofTheLastMonth1 as yyyymmdd(e.g 20230331) in infile statement, when I am running above code, it's not resolving, kindly suggest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;INFILE 'Path\ScannedFiles_&lt;FONT color="#FF0000"&gt;20230331&lt;/FONT&gt;.txt' delimiter=',' dsd;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 06:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872128#M344561</guid>
      <dc:creator>kumarsandip975</dc:creator>
      <dc:date>2023-04-26T06:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872133#M344565</link>
      <description>&lt;P&gt;An&amp;nbsp;&lt;EM&gt;informat&lt;/EM&gt; only influences what happens in an INPUT statement, it does not affect the&amp;nbsp;&lt;EM&gt;value&lt;/EM&gt; stored in a variable.&lt;/P&gt;
&lt;P&gt;Your task can be done in a single %LET:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let lastdayofthelastmonth = %sysfunc(intnx(month,%sysfunc(today()),-1,e),yymmddn8.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 06:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872133#M344565</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-26T06:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872143#M344569</link>
      <description>&lt;P&gt;Apart from what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote, your code as shown will not work anyway. When you have your macro variable right, the line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INFILE 'Path\ScannedFiles_&amp;amp;lastDayofTheLastMonth1..txt' delimiter=',' dsd;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should be changed to&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INFILE "Path\ScannedFiles_&amp;amp;lastDayofTheLastMonth1..txt" delimiter=',' dsd;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as macro variables inside single quote are not resolved.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 07:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programming-Help/m-p/872143#M344569</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2023-04-26T07:13:00Z</dc:date>
    </item>
  </channel>
</rss>

