<?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: Need a macro to run daily data for unlimited number of days in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942553#M369592</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a code which I am running to join data for certain number of days but now I need to extend the same code for unlimited number of days using a macro.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is your question: how to run this code every day?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or is the question how to modify the code so it runs properly on a future day?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or is the question something else?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 18:44:10 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-09-04T18:44:10Z</dc:date>
    <item>
      <title>Need a macro to run daily data for unlimited number of days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942547#M369590</link>
      <description>&lt;P&gt;I have a code which I am running to join data for certain number of days but now I need to extend the same code for unlimited number of days using a macro. Can anyone please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kajal&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sql;
create table f.rprt as 
select 
a.TY_NUMBER as TY_NUMBER,
a.IO_NUMBER  as  a_IO_NUMBER,		
b.IO_NUMBER  as  b_IO_NUMBER,		
c.IO_NUMBER  as  c_IO_NUMBER,		
d.IO_NUMBER  as  d_IO_NUMBER,
e.IO_NUMBER  as  e_IO_NUMBER,

a.GN_ID  as  a_GN_ID,		
b.GN_ID  as  b_GN_ID,		
c.GN_ID  as  c_GN_ID,		
d.GN_ID  as  d_GN_ID,
e.GN_ID  as  e_GN_ID,
a.ON_ID  as  a_ON_ID,		
b.ON_ID  as  b_ON_ID,		
c.ON_ID  as  c_ON_ID,		
d.ON_ID  as  d_ON_ID,
e.ON_ID  as  e_ON_ID,

a.C_TYPE  as  a_C_TYPE,		
b.C_TYPE  as  b_C_TYPE,		
c.C_TYPE  as  c_C_TYPE,		
d.C_TYPE  as  d_C_TYPE,
e.C_TYPE  as  e_C_TYPE,

a.ME_ID  as  a_ME_ID,		
b.ME_ID  as  b_ME_ID,		
c.ME_ID  as  c_ME_ID,		
d.ME_ID  as  d_ME_ID,
e.ME_ID  as  e_ME_ID 
from out.heads_20 as a 
left join 
out2.heads_21 as b
on a.TY_NUMBER = b.TY_NUMBER and a.VE_DATE = b.VE_DATE
left join 
out3.heads_23 as c
on b.TY_NUMBER = c.TY_NUMBER and b.VE_DATE = c.VE_DATE
left join 
out4.heads_26 as d 
on c.TY_NUMBER = d.TY_NUMBER and c.VE_DATE = d.VE_DATE
left join 
out5.heads_28 as e 
on d.TY_NUMBER = e.TY_NUMBER and d.VE_DATE = e.VE_DATE
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 18:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942547#M369590</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2024-09-04T18:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to run daily data for unlimited number of days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942553#M369592</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a code which I am running to join data for certain number of days but now I need to extend the same code for unlimited number of days using a macro.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is your question: how to run this code every day?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or is the question how to modify the code so it runs properly on a future day?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or is the question something else?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 18:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942553#M369592</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-04T18:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to run daily data for unlimited number of days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942557#M369595</link>
      <description>&lt;P&gt;Initially I was running this code for few days let say 5 so I was able to hardcode all days dates in the join condition but now I need to run this for about 33 days so need a macro which can automatically replace the table name in the join condition to use all available dates and join data for all those 33 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kajal&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 18:49:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942557#M369595</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2024-09-04T18:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to run daily data for unlimited number of days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942561#M369596</link>
      <description>&lt;P&gt;Thanks, I think I understand now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggestion: instead of this data structure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;a.IO_NUMBER  as  a_IO_NUMBER,		
b.IO_NUMBER  as  b_IO_NUMBER,		
c.IO_NUMBER  as  c_IO_NUMBER,		
d.IO_NUMBER  as  d_IO_NUMBER,
e.IO_NUMBER  as  e_IO_NUMBER,&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which creates a wide data set, much easier to program if you create a long data set instead. And also it is much easier to perform follow-up analyses when you have a long data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you'd like to go that way, let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 19:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942561#M369596</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-04T19:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to run daily data for unlimited number of days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942585#M369603</link>
      <description>&lt;P&gt;yeah that seems better idea plz put the snapshot code here I will use that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kajal&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 19:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942585#M369603</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2024-09-04T19:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to run daily data for unlimited number of days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942601#M369611</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data f.rprt;
    set out.heads_20 out2.heads_21 out3.heads_23 out4.heads_26 out5.heads_28
        indsname=indsname;
    by ty_number ve_date;
    orig_dsn=indsname;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 20:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-run-daily-data-for-unlimited-number-of-days/m-p/942601#M369611</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-04T20:47:44Z</dc:date>
    </item>
  </channel>
</rss>

