<?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: creating view in proc sql without the creation in work of the corresponding data set in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324467#M62177</link>
    <description>I'm not really following, what is the actual problem?&lt;BR /&gt;When you define views corresponding SAS files are created but they contain no data, just the definition  ("meta data"). Can't see any problem hee since those very light weight. The problem will problem will more likely to occur when calling your views, it's not very efficient to call the same table that many times, but that will show later...</description>
    <pubDate>Fri, 13 Jan 2017 07:12:33 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2017-01-13T07:12:33Z</dc:date>
    <item>
      <title>creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324010#M62149</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Enterprise 5.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use "proc sql" and "create view" &amp;nbsp;in a macro to create 100 views that I want to use later in my program one by one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, althouth It is written everywhere that the advantage of views is that they do no contain data and execute only when&lt;/P&gt;&lt;P&gt;called, my program actually creates the 100 files when I call this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%do %while ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create view as dsNb&amp;amp;nb as select .....;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the noexec option, then when I call the view later on, I do not get back the correct data set but the last data set without&lt;/P&gt;&lt;P&gt;the noexec.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do someone knonw how to prevent SAS to create the data sets corresponding to the views as I run my macro ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help,&lt;/P&gt;&lt;P&gt;Thierry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 17:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324010#M62149</guid>
      <dc:creator>valleet</dc:creator>
      <dc:date>2017-01-11T17:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324016#M62152</link>
      <description>&lt;P&gt;Have&amp;nbsp; you tried changing "view as" to "view" (removing the first "as")?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 18:13:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324016#M62152</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-11T18:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324164#M62154</link>
      <description>&lt;P&gt;You can write the sas view definitions to physical text files and then include the same in your code when required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is one such example, you need to trim it as per your scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename sasview "c:\users\cxx\desktop\views.txt";

DATA _NULL_;
	set viewdef end=last;
	i=1;
	do while(i=100);
		i+1;
		file sasview mod;
		put 'proc sql;';
		put 'create view ' viewname&amp;amp;nb 'as select';
		put 'from ' col_name;
                put ' group by' grp_naame ';';
		put 'order by' orderby_stat;
                put ';';
		put 'quit;';
	end;
run;

%inc sasview;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Jan 2017 06:26:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324164#M62154</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2017-01-12T06:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324193#M62156</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There should be no data inside those files (*.sas7vew) , only the definition of the view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should have just a few KB in size each.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have created the view with PROC SQL, you can issue the following command to check the view's definition&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt; proc sql;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;describe view libname.viewname;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Still if the those files are a&amp;nbsp;problem check&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34466"&gt;@mnjtrana&lt;/a&gt;&amp;nbsp;solution to create them only at the time you need them.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Hope it helps.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 10:01:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324193#M62156</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2017-01-12T10:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324195#M62157</link>
      <description>&lt;BR /&gt;&lt;P&gt;&lt;FONT size="2" face="sans-serif"&gt;Thhanks Astounding for your answer.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;SAS definitively need the "as" there.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;But now I think that what is stored in WORK is actually the view as the icone used is slightly different from the one use for data sets (although the Properties menu&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;indicates the object &amp;nbsp;type as "data set". &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;So it seems so that my real problem is that the data sets corresponding to the views are output as data sets in the output panel, or whatever it is called, How could I avoid that.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;Thierry&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 10:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324195#M62157</guid>
      <dc:creator>valleet</dc:creator>
      <dc:date>2017-01-12T10:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324197#M62158</link>
      <description>&lt;BR /&gt;&lt;P&gt;&lt;FONT size="2" face="sans-serif"&gt;Thanks Daniel for your answer.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;Now I think that what is stored in WORK is actually the views as the icone used is slightly different from the one use for data sets (although the Properties menu&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;indicates the object &amp;nbsp;type as "data set").&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;So it seems so that my real problem is that the data sets corresponding to the views are output as in the "output panel", or whatever it is called, Is it possible to avoid that.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;Thierry&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="sans-serif"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 10:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324197#M62158</guid>
      <dc:creator>valleet</dc:creator>
      <dc:date>2017-01-12T10:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: creating view in proc sql without the creation in work of the corresponding data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324467#M62177</link>
      <description>I'm not really following, what is the actual problem?&lt;BR /&gt;When you define views corresponding SAS files are created but they contain no data, just the definition  ("meta data"). Can't see any problem hee since those very light weight. The problem will problem will more likely to occur when calling your views, it's not very efficient to call the same table that many times, but that will show later...</description>
      <pubDate>Fri, 13 Jan 2017 07:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-view-in-proc-sql-without-the-creation-in-work-of-the/m-p/324467#M62177</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-01-13T07:12:33Z</dc:date>
    </item>
  </channel>
</rss>

