<?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: Data load by macro in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Data-load-by-macro/m-p/476675#M14925</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro dataload(year=17,month=11);
data _null_;
day = day(intnx('month',"20&amp;amp;year&amp;amp;month.01",0,"e"));
call symputx('day',put(day,z2.),'l');
run;
/* use &amp;amp;day in the rest of your macro where needed */
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Jul 2018 07:08:39 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-07-10T07:08:39Z</dc:date>
    <item>
      <title>Data load by macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-load-by-macro/m-p/476662#M14924</link>
      <description>&lt;P&gt;I want to load data by using macro&amp;nbsp;but last day is different from month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example, in feb last day is 31 but in april 30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i do..?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro dataload(year=17,month=11);&lt;/P&gt;&lt;P&gt;proc import out = temp;&lt;BR /&gt;%if &amp;amp;month=1 or &amp;amp;month=3 or &amp;amp;month=5 or &amp;amp;month=7 or &amp;amp;month=8 or &amp;amp;month=10 or &amp;amp;month=12 %then&lt;BR /&gt;datafile = "J:&lt;SPAN&gt;\&lt;/SPAN&gt;&amp;amp;year..&amp;amp;month.\&amp;amp;20&amp;amp;year.&amp;amp;month.01-20%year.%month.31.xlsx"&lt;BR /&gt;%else &amp;amp;month= 4 or &amp;amp;month= 6 or &amp;amp;month= 9 or &amp;amp;month= 11 %then&lt;BR /&gt;datafile = "J:\&amp;amp;year..&amp;amp;month.\&amp;amp;20&amp;amp;year.&amp;amp;month.01-20%year.%month.30.xlsx"&lt;BR /&gt;%else &amp;amp;month=2 and &amp;amp;year=16 %then&lt;BR /&gt;datafile =&lt;SPAN&gt;&amp;nbsp;"J:\&lt;/SPAN&gt;&amp;amp;year..&amp;amp;month.\&amp;amp;20&amp;amp;year.&amp;amp;month.01-20%year.%month.29.xlsx"&lt;BR /&gt;%else &amp;amp;month=2 %then&lt;BR /&gt;datafile = &lt;SPAN&gt;&amp;nbsp;"J:\&amp;amp;&lt;/SPAN&gt;year..&amp;amp;month.\&amp;amp;20&amp;amp;year.&amp;amp;month.01-20%year.%month.28.xlsx"&lt;BR /&gt;DBMS = XLSX replace;&lt;BR /&gt;sheet = "sheet1";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%mend&lt;/P&gt;&lt;P&gt;%dataload(year=17,month=11);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%dataload(year=17,month=10);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%dataload(year=17,month=09);&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 04:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-load-by-macro/m-p/476662#M14924</guid>
      <dc:creator>asdfsa</dc:creator>
      <dc:date>2018-07-10T04:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data load by macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-load-by-macro/m-p/476675#M14925</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro dataload(year=17,month=11);
data _null_;
day = day(intnx('month',"20&amp;amp;year&amp;amp;month.01",0,"e"));
call symputx('day',put(day,z2.),'l');
run;
/* use &amp;amp;day in the rest of your macro where needed */
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 07:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-load-by-macro/m-p/476675#M14925</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-10T07:08:39Z</dc:date>
    </item>
  </channel>
</rss>

