<?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 Create Empty Data File in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62091#M13523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for all the reply.&amp;nbsp; I will try out both the option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Sep 2011 20:50:42 GMT</pubDate>
    <dc:creator>newbi</dc:creator>
    <dc:date>2011-09-09T20:50:42Z</dc:date>
    <item>
      <title>Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62088#M13520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have program that imports the source data into sas dataset daily.&amp;nbsp; Is it possible in SAS to create empty data file and export it to some location when the actual source file is not found ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 15:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62088#M13520</guid>
      <dc:creator>newbi</dc:creator>
      <dc:date>2011-09-08T15:17:36Z</dc:date>
    </item>
    <item>
      <title>Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62089#M13521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course!&amp;nbsp; You can use either a datastep or proc sql and just assign a libname to the directory where you want it to exist.&amp;nbsp; e.g.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA CORP.want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; SET CORP.have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; STOP;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC SQL noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CREATE TABLE CORP.want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIKE CORP.have&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 15:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62089#M13521</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-09-08T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62090#M13522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want a data set with variables and zero obs or zero variables and zero obs?&amp;nbsp; If you want variables and zero obs do you have a data set where the variable attributes can be copied from?&amp;nbsp; For 0:0 you can use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;2128 data zero;&lt;/P&gt;&lt;P&gt;2129 stop;&lt;/P&gt;&lt;P&gt;2130 run;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.ZERO has 0 observations and 0 variables.&lt;/P&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;The 0:0 data could be used in a program to add obs to an existing data set.&amp;nbsp; Where nothing happens unless the 0:0 is not 0:0 but actually has variables and observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;2136 data class;&lt;/P&gt;&lt;P&gt;2137 set sashelp.class;&lt;/P&gt;&lt;P&gt;2138 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.CLASS has 19 observations and 5 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2139 data class;&lt;/P&gt;&lt;P&gt;2140 if 0 then modify class;&lt;/P&gt;&lt;P&gt;2141 set zero;&lt;/P&gt;&lt;P&gt;2142 output;&lt;/P&gt;&lt;P&gt;2143 run;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.CLASS has been updated. There were 0 observations rewritten, 0&lt;/P&gt;&lt;P&gt;observations added and 0 observations deleted.&lt;/P&gt;&lt;P&gt;NOTE: There were 0 observations read from the data set WORK.ZERO.&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So as you see it depends on what you have and what you want. :smileygrin:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 15:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62090#M13522</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-09-08T15:42:31Z</dc:date>
    </item>
    <item>
      <title>Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62091#M13523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for all the reply.&amp;nbsp; I will try out both the option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 20:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62091#M13523</guid>
      <dc:creator>newbi</dc:creator>
      <dc:date>2011-09-09T20:50:42Z</dc:date>
    </item>
    <item>
      <title>Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62092#M13524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to create empty table with variables.&amp;nbsp; Also, is it possible to check to see if the file exist if it does then use the original file as main source if it does not create empty data set to avoid the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Sep 2011 23:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62092#M13524</guid>
      <dc:creator>newbi</dc:creator>
      <dc:date>2011-09-10T23:51:31Z</dc:date>
    </item>
    <item>
      <title>Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62093#M13525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could always use one of the methods combined with a macro as shown at:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/24/670.html"&gt;http://support.sas.com/kb/24/670.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Sep 2011 00:44:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62093#M13525</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-09-11T00:44:24Z</dc:date>
    </item>
    <item>
      <title>Create Empty Data File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62094#M13526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I use fileexist to check if the file exist or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Sep 2011 03:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Empty-Data-File/m-p/62094#M13526</guid>
      <dc:creator>newbi</dc:creator>
      <dc:date>2011-09-11T03:10:17Z</dc:date>
    </item>
  </channel>
</rss>

