<?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 SAS dataset and view in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115888#M32025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody can briefly tell me&amp;nbsp; the difference between view and dataset? best with a small example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2012 18:26:27 GMT</pubDate>
    <dc:creator>Mike_Davis</dc:creator>
    <dc:date>2012-05-15T18:26:27Z</dc:date>
    <item>
      <title>SAS dataset and view</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115888#M32025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody can briefly tell me&amp;nbsp; the difference between view and dataset? best with a small example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 18:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115888#M32025</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-05-15T18:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset and view</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115889#M32026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lets asume you have a dataset A. We then create another dataset B and a view C that are exact copies of A.&amp;nbsp; If we then make a change to dataset A by adding or removing rows, etc. there will be no change to dataset B until we programatically update.&amp;nbsp; The view C, however, will be updated without submitting any statements.&lt;/P&gt;&lt;P&gt;data A;&lt;/P&gt;&lt;P&gt;val=1; output;&lt;/P&gt;&lt;P&gt;val=2;output; &lt;/P&gt;&lt;P&gt;val=3;output; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data B;&lt;/P&gt;&lt;P&gt;set A;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create view C as&lt;/P&gt;&lt;P&gt;select * from A;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data A;&lt;/P&gt;&lt;P&gt;set A;&lt;/P&gt;&lt;P&gt;where val ne 2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=B;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=C;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 19:01:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115889#M32026</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2012-05-15T19:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset and view</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115890#M32027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Views may also be created to reference non-SAS data sources. Suppose you have a process that outputs a text file with the same name daily such as "d:\project\output.text". You could have a SAS view reference that data source. Each time the VIEW is used it re-reads that data so it always has the freshest version. If you place the VIEW in a permanent library such as below you only need to reference it like any other data set an it will re-read the data. Drawback: It re-reads the data &lt;STRONG&gt;every time&lt;/STRONG&gt; it is referenced. If the external file is large the performance could be a significant problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mylib.project / view=mylib.project;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "d:\project\output.text" (various options as needed);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input variables;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find views very useful when the component data sets are not terribly large but change frequently so the combined result doesn't require me to remember to rebuild everytime.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 22:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115890#M32027</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-05-15T22:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset and view</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115891#M32028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another feature:&amp;nbsp; views don't take up space.&amp;nbsp; They save the instructions for how to extract data, rather than the data itself.&amp;nbsp; This program needs to store a new data set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data totals;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set liquids;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tot_liquid = 2* pints + 4*quarts;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=totals;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var tot_liquid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But by making a small change, and creating a view instead of a data set, the storage space requirements are virtually eliminated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data totals / view=totals;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(The rest of the program remains the same.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 00:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115891#M32028</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-05-16T00:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset and view</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115892#M32029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;View only contains the information using to search the real data (i.e. you can call it as SAS Code or SQL code), which doesn't contain any real data.&lt;/P&gt;&lt;P&gt;Table is actually dataset which contain the real data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 02:51:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-dataset-and-view/m-p/115892#M32029</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-16T02:51:57Z</dc:date>
    </item>
  </channel>
</rss>

