<?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: create a zero observation  dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45375#M1987</link>
    <description>Hi Leena,&lt;BR /&gt;
&lt;BR /&gt;
You can also use two methods to do this:&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;data likeshoes;&lt;BR /&gt;
set sasuser.shoes (obs=0);&lt;BR /&gt;
run;&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
OR&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;proc sql;&lt;BR /&gt;
create table test like sasuser.shoes;&lt;BR /&gt;
quit;&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Saurabh</description>
    <pubDate>Fri, 12 Feb 2010 08:44:23 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-02-12T08:44:23Z</dc:date>
    <item>
      <title>create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45372#M1984</link>
      <description>how can create a zero observation dataset?</description>
      <pubDate>Fri, 22 Jan 2010 11:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45372#M1984</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-22T11:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45373#M1985</link>
      <description>&lt;P&gt;By stopping before you output and if you want before you read any obs. &amp;nbsp;Use&lt;A href="http://go.documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lestmtsref&amp;amp;docsetTarget=p02jy612cym9oxn10i19cbewlrdf.htm&amp;amp;locale=en" target="_self"&gt; the STOP statement&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data likeshoes;
 stop;
 set sashelp.shoes;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NOTE: The data set WORK.LIKESHOES has 0 observations and 7 variables.&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Other methods - use OBS=0 on the SET statement, &lt;A href="http://go.documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=sqlproc&amp;amp;docsetTarget=p1l9ypkml4febvn0zsbkwev7v5x9.htm&amp;amp;locale=en" target="_self"&gt;or PROC SQL with the LIKE statement&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data likeshoes;
 set sashelp.shoes (obs=0);
run;

proc sql;
  create table test like sashelp.shoes;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 13:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45373#M1985</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-06-01T13:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45375#M1987</link>
      <description>Hi Leena,&lt;BR /&gt;
&lt;BR /&gt;
You can also use two methods to do this:&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;data likeshoes;&lt;BR /&gt;
set sasuser.shoes (obs=0);&lt;BR /&gt;
run;&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
OR&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;proc sql;&lt;BR /&gt;
create table test like sasuser.shoes;&lt;BR /&gt;
quit;&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Saurabh</description>
      <pubDate>Fri, 12 Feb 2010 08:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45375#M1987</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-12T08:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45376#M1988</link>
      <description>could you tell me use of stop statement</description>
      <pubDate>Fri, 12 Feb 2010 12:27:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45376#M1988</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-12T12:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45377#M1989</link>
      <description>In a data step when no user supplied OUTPUT statement is coded there is an implied output statement and a RETURN statement.  So unless changed all SAS data steps end with OUTPUT; RETURN;&lt;BR /&gt;
&lt;BR /&gt;
The zero obs data set data step could be thought of as being coded like this.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data zero;&lt;BR /&gt;
   stop;&lt;BR /&gt;
   set sashelp.class;&lt;BR /&gt;
   OUTPUT;&lt;BR /&gt;
   RETURN;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
The STOP is needed to keep that implied OUTPUT from executing, without it you would get a data set with 1 observation.</description>
      <pubDate>Fri, 12 Feb 2010 12:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45377#M1989</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-02-12T12:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45378#M1990</link>
      <description>Hi:&lt;BR /&gt;
  The SAS documentation is an invaluable resource to answer questions like these. For example, the STOP statement documentation:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000214597.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000214597.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  And other processing statements relevant to the DATA step are outlined here with links to the specific documentation topic (I have this link bookmarked and recommend that my students make this link a favorite):&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a001225397.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a001225397.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  But, support.sas.com can be used for more than just documentation lookups. For example, a question about creating a zero observation dataset can be researched on support.sas.com. For example, if you go to support.sas.com and enter the search string: &lt;B&gt;&lt;BR /&gt;
create zero obs dataset &lt;/B&gt;&lt;BR /&gt;
       &lt;BR /&gt;
in the search box in the upper right hand corner of the support web page, then the first hit returned from the search is this user group paper, entitled:&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
SUGI 28: Creating Tables or Listings with a Zero-Record SAS(r) Data Set -- Basic Program Structure and Three Simple Techniques&lt;/B&gt;&lt;BR /&gt;
with a link directly to the paper:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/218-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/218-28.pdf&lt;/A&gt; &lt;BR /&gt;
  &lt;BR /&gt;
AND, the paper discusses the reasons why you might want to create a zero obs dataset.&lt;BR /&gt;
     &lt;BR /&gt;
SUPPORT.SAS.COM contains a wealth of knowledge -- not just documentation. When you search, you can restrict yourself to the SAS Notes, to the SAS Documentation or you can search all available resources and samples. Learning to navigate these resources and use them, will help you in all your programming endeavors.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 13 Feb 2010 00:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/45378#M1990</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-02-13T00:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/352363#M18468</link>
      <description>&lt;P&gt;Datastep:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data data2;&lt;BR /&gt;set sashelp.class(obs=0);&lt;BR /&gt;run;&lt;BR /&gt;proc print data=data2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data data3;&lt;BR /&gt;stop;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SQL :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table data4 like sashelp.class;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 01:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/352363#M18468</guid>
      <dc:creator>Suman999</dc:creator>
      <dc:date>2017-04-22T01:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: create a zero observation  dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/470196#M24462</link>
      <description>&lt;P&gt;To create a zero observation dataset with column specifications:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA work.MEMBER;&lt;BR /&gt;LENGTH NAME $ 28 DOB 4;&lt;BR /&gt;FORMAT DOB DATE9.;&lt;BR /&gt;INFORMAT DOB DATE9.;&lt;BR /&gt;STOP;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It is same like Create Table doing PROC SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table work.member&lt;BR /&gt;(Name varchar(28) ,&lt;BR /&gt;DOB num format date9.&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 05:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/create-a-zero-observation-dataset/m-p/470196#M24462</guid>
      <dc:creator>arpi</dc:creator>
      <dc:date>2018-06-14T05:53:50Z</dc:date>
    </item>
  </channel>
</rss>

