<?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 Can sas view be dynamic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282613#M57458</link>
    <description>&lt;P&gt;I have following sas view with where condition. First time I pass the value of User_date as 1Jan2016 and view become fixed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I change the user date to 2Jan2016, it shows me 1Jan data. I tried it with diferent session but view is resulting in 1 Jan records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have view with flexibility to show me different record if I change the value of User_date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create view temp_view as&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from table1 &lt;STRONG&gt;where RUN_DATE = &amp;amp;USER_DATE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2016 05:38:46 GMT</pubDate>
    <dc:creator>RahulG</dc:creator>
    <dc:date>2016-07-07T05:38:46Z</dc:date>
    <item>
      <title>Can sas view be dynamic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282613#M57458</link>
      <description>&lt;P&gt;I have following sas view with where condition. First time I pass the value of User_date as 1Jan2016 and view become fixed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I change the user date to 2Jan2016, it shows me 1Jan data. I tried it with diferent session but view is resulting in 1 Jan records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have view with flexibility to show me different record if I change the value of User_date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create view temp_view as&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from table1 &lt;STRONG&gt;where RUN_DATE = &amp;amp;USER_DATE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 05:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282613#M57458</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-07-07T05:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can sas view be dynamic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282616#M57459</link>
      <description>I don't have SAS at my fingertips right to test, bet perhaps symget() could work?&lt;BR /&gt;If not, store you dynamic value in a table and use it in a inner join/sub query in the view.</description>
      <pubDate>Thu, 07 Jul 2016 06:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282616#M57459</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-07-07T06:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can sas view be dynamic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282624#M57465</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create view temp_view as
select *
from sashelp.class where sex=symget('USER_DATE');
quit;


%let USER_DATE=F;
proc print data=temp_view ;run;





%let USER_DATE=M;
proc print data=temp_view ;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jul 2016 06:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-sas-view-be-dynamic/m-p/282624#M57465</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-07T06:53:33Z</dc:date>
    </item>
  </channel>
</rss>

