<?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 set to two datasets? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12051#M1552</link>
    <description>Can anyone explain what the following code does?It is just before a proc surveymeans.  The data set has ca.type has type=1, type=2, type=3.  I inherited the program and don't understand it:&lt;BR /&gt;
&lt;BR /&gt;
data ca.type;&lt;BR /&gt;
   set cak;&lt;BR /&gt;
   type ' '0';&lt;BR /&gt;
run;&lt;BR /&gt;
data ca.type;&lt;BR /&gt;
    set ca.type cak;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sort data = ca.type;&lt;BR /&gt;
    by type;&lt;BR /&gt;
run;</description>
    <pubDate>Fri, 18 Apr 2008 18:44:09 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-04-18T18:44:09Z</dc:date>
    <item>
      <title>set to two datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12051#M1552</link>
      <description>Can anyone explain what the following code does?It is just before a proc surveymeans.  The data set has ca.type has type=1, type=2, type=3.  I inherited the program and don't understand it:&lt;BR /&gt;
&lt;BR /&gt;
data ca.type;&lt;BR /&gt;
   set cak;&lt;BR /&gt;
   type ' '0';&lt;BR /&gt;
run;&lt;BR /&gt;
data ca.type;&lt;BR /&gt;
    set ca.type cak;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sort data = ca.type;&lt;BR /&gt;
    by type;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 18 Apr 2008 18:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12051#M1552</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-18T18:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: set to two datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12052#M1553</link>
      <description>First you make a mistake in copying the code your first type is in that case: type ='0';&lt;BR /&gt;
if not go to third!&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Second&lt;BR /&gt;
you have a first datastep creating a sas dataset with the name type &lt;BR /&gt;
written in the library defined behind the libref ca&lt;BR /&gt;
In that data step, you are reading temporary sas dataset cak and adding to every &lt;BR /&gt;
observations a new variable numeric type with value 0&lt;BR /&gt;
with a second datastep you are taking the preceeding table issued from the datastep&lt;BR /&gt;
and adding once again cak dataset.&lt;BR /&gt;
 as the structure is the same for both dataset except that you don't have the type variable &lt;BR /&gt;
 in cak, type will take as value the . as missing value&lt;BR /&gt;
in the third step you are sorting the final ca.type dataset upon the value of type&lt;BR /&gt;
&lt;BR /&gt;
Third Now a personnal remark : &lt;BR /&gt;
If you are saying that type as already values like 1 2 3&lt;BR /&gt;
I too don't understand nothing&lt;BR /&gt;
&lt;BR /&gt;
so my final suggestion&lt;BR /&gt;
work step by step &lt;BR /&gt;
and after every step take a look at your output table with VT command&lt;BR /&gt;
to understand what's happening to type!&lt;BR /&gt;
&lt;BR /&gt;
And read your log especially after the first step submit.&lt;BR /&gt;
&lt;BR /&gt;
Andre&lt;BR /&gt;
 &lt;BR /&gt;
HTH &lt;BR /&gt;
Andre</description>
      <pubDate>Mon, 21 Apr 2008 08:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12052#M1553</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2008-04-21T08:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: set to two datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12053#M1554</link>
      <description>Thanks! I appreciate your response!</description>
      <pubDate>Mon, 21 Apr 2008 15:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-to-two-datasets/m-p/12053#M1554</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-21T15:42:05Z</dc:date>
    </item>
  </channel>
</rss>

