<?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: Assigning individuals to a common household in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502727#M134244</link>
    <description>&lt;P&gt;No, you need to download the macro code from the page &lt;A href="https://communities.sas.com/t5/tkb/articleprintpage/tkb-id/library/article-id/1045" target="_blank"&gt;https://communities.sas.com/t5/tkb/articleprintpage/tkb-id/library/article-id/1045&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 14:53:29 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2018-10-09T14:53:29Z</dc:date>
    <item>
      <title>Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/501867#M133903</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone could provide some insight into this issue I would be very appreciative.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset one is a list of individuals (circa 5 million) One variable called ID which ranges from 1 to N.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset two has a list of relationships (circa 11 million). This is how the dataset looks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID	ID_1	Relationsip of ID to ID_1
1	104428	Married 
2	36186	Parent
3	507094	Parent
4	147446	Parent
5	453559	Parent
6	395150	Sibling
7	495697	Married 
8	430549	Parent
9	430304	Married 
10	110819	Married 
11	218256	Married 
12	199523	Married 
13	72263	Parent
14	73282	Married 
15	87799	Parent
16	376709	Parent
17	9042	Married 
18	421753	Parent
19	463196	Sibling
20	97903	Married 
87799	15	Child
376709	16	Child
9042	17	Married 
421753	18	Child
463196	19	Sibling
97903	20	Married &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in theory dataset two provides information as to all the different links people have who are found in dataset one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is look through dataset two and if I find a relationship between two people I need to assign a household_id to individuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that that the same individuals can be found in both id and id1 and there can be many different relationships.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need some code that will look through column 1 and then look through column 2 and if finding someone assigns them to a household, along with the person in the relationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to end up with a case where id 15 and 8799 are assigned different households as they are found in the same column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So a dataset such as this would be the final outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID	Household_id
1	x_100
2	x_101
3	x_102
4	x_103
5	x_104
6	x_105
7	x_106
8	x_107
9	x_108
10	x_109
11	x_110
12	x_111
13	x_112
14	x_113
15	x_114
16	x_115
17	x_116
18	x_117
19	x_118
20	x_119
104428	x_100
36186	x_101
507094	x_102
147446	x_103
453559	x_104
395150	x_105
495697	x_106
430549	x_107
430304	x_108
110819	x_109
218256	x_110
199523	x_111
72263	x_112
73282	x_113
87799	x_114
376709	x_115
9042	x_116
421753	x_117
463196	x_118
97903	x_119&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 12:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/501867#M133903</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-05T12:57:24Z</dc:date>
    </item>
    <item>
      <title>Assigning individuals to households - efficient method needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/501865#M133904</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone could provide some insight into this issue I would be very appreciative.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset one is a list of individuals (circa 5 million) One variable called ID which ranges from 1 to N.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset two has a list of relationships (circa 11 million). This is how the dataset looks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID	ID_1	Relationsip of ID to ID_1
1	104428	Married 
2	36186	Parent
3	507094	Parent
4	147446	Parent
5	453559	Parent
6	395150	Sibling
7	495697	Married 
8	430549	Parent
9	430304	Married 
10	110819	Married 
11	218256	Married 
12	199523	Married 
13	72263	Parent
14	73282	Married 
15	87799	Parent
16	376709	Parent
17	9042	Married 
18	421753	Parent
19	463196	Sibling
20	97903	Married 
87799	15	Child
376709	16	Child
9042	17	Married 
421753	18	Child
463196	19	Sibling
97903	20	Married &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in theory dataset two provides information as to all the different links people have who are found in dataset one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is look through dataset two and if I find a relationship between two people I need to assign a household_id to individuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that that the same individuals can be found in both id and id1 and there can be many different relationships.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need some code that will look through column 1 and then look through column 2 and if finding someone assigns them to a household, along with the person in the relationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to end up with a case where id 15 and 8799 are assigned different households as they are found in the same column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So a dataset such as this would be the final outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID	Household_id
1	x_100
2	x_101
3	x_102
4	x_103
5	x_104
6	x_105
7	x_106
8	x_107
9	x_108
10	x_109
11	x_110
12	x_111
13	x_112
14	x_113
15	x_114
16	x_115
17	x_116
18	x_117
19	x_118
20	x_119
104428	x_100
36186	x_101
507094	x_102
147446	x_103
453559	x_104
395150	x_105
495697	x_106
430549	x_107
430304	x_108
110819	x_109
218256	x_110
199523	x_111
72263	x_112
73282	x_113
87799	x_114
376709	x_115
9042	x_116
421753	x_117
463196	x_118
97903	x_119&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 12:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/501865#M133904</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-05T12:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to households - efficient method needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502040#M133961</link>
      <description>&lt;P&gt;SAS has great network detection and optimization tools:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optnet data_links=Have out_nodes=Network;
	data_links_var from=ID to=ID_1;
	concomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502040#M133961</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2018-10-05T20:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to households - efficient method needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502069#M133966</link>
      <description>&lt;P&gt;I have frequently used proc optnet for this sort of problem. It's perfect for this task.&amp;nbsp; And the CONCOMP statement effectively provides the household id's in the output data set.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 22:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502069#M133966</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-10-05T22:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502102#M133983</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
infile cards expandtabs;
input from $  to $ ;
cards;
1	104428	Married 
2	36186	Parent
3	507094	Parent
4	147446	Parent
5	453559	Parent
6	395150	Sibling
7	495697	Married 
8	430549	Parent
9	430304	Married 
10	110819	Married 
11	218256	Married 
12	199523	Married 
13	72263	Parent
14	73282	Married 
15	87799	Parent
16	376709	Parent
17	9042	Married 
18	421753	Parent
19	463196	Sibling
20	97903	Married 
87799	15	Child
376709	16	Child
9042	17	Married 
421753	18	Child
463196	19	Sibling
97903	20	Married
;
run;
data full;
  set have end=last;
  if _n_ eq 1 then do;
   declare hash h();
    h.definekey('node');
     h.definedata('node');
     h.definedone();
  end;
  output;
  node=from; h.replace();
  from=to; to=node;
  output;
  node=from; h.replace();
  if last then h.output(dataset:'node');
  drop node;
run;


data want(keep=node household);
declare hash ha(ordered:'a');
declare hiter hi('ha');
ha.definekey('count');
ha.definedata('last');
ha.definedone();
declare hash _ha(hashexp: 20);
_ha.definekey('key');
_ha.definedone();

if 0 then set full;
declare hash from_to(dataset:'full(where=(from is not missing and to is not missing))',hashexp:20,multidata:'y');
 from_to.definekey('from');
 from_to.definedata('to');
 from_to.definedone();

if 0 then set node;
declare hash no(dataset:'node');
declare hiter hi_no('no');
 no.definekey('node');
 no.definedata('node');
 no.definedone();
 

do while(hi_no.next()=0);
 household+1; output;
 count=1;
 key=node;_ha.add();
 last=node;ha.add();
 rc=hi.first();
 do while(rc=0);
   from=last;rx=from_to.find();
   do while(rx=0);
     key=to;ry=_ha.check();
      if ry ne 0 then do;
       node=to;output;rr=no.remove(key:node);
       key=to;_ha.add();
       count+1;
       last=to;ha.add();
      end;
      rx=from_to.find_next();
   end;
   rc=hi.next();
end;
ha.clear();_ha.clear();
end;
stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Oct 2018 11:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502102#M133983</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-10-06T11:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to households - efficient method needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502327#M134084</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS enterprise guide 7.1 and it doesn't appear that this procedure is available?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 09:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502327#M134084</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-08T09:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502411#M134113</link>
      <description>&lt;P&gt;I just have a follow up query here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While this code works perfectly I'm running into memory issues. My relationship dataset has circa 12,000,000 observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the code on my dataset the program eventually bombs out due to memory issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to resolve this or provide a solution?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 13:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502411#M134113</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-08T13:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502670#M134219</link>
      <description>&lt;P&gt;WOW. Can't believe you have so big table.&lt;/P&gt;
&lt;P&gt;Assign more memory to&amp;nbsp; sas by option -memsize 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rick click the SAS icon and select attribution .&lt;/P&gt;
&lt;P&gt;fill the following line into TARGET :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"C:\Program Files\SAS\SASFoundation\9.2(32-bit)\sas.exe" -CONFIG "C:\Program Files\SAS\SASFoundation\9.2(32-bit)\nls\en\SASV9.CFG"&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;-memsize 0&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 12:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502670#M134219</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-10-09T12:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502673#M134221</link>
      <description>&lt;P&gt;Here is a blog about make your memory bigger.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/07/31/large-matrices.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/07/31/large-matrices.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS.&amp;nbsp; also try add an option&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;options compress=yes;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;at top of my code.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 12:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502673#M134221</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-10-09T12:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502677#M134222</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/116786"&gt;@Sean_OConnor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess it's the last datastep that requires too much RAM because it uses &lt;EM&gt;four&lt;/EM&gt; hash objects. In the past, &lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-create-a-group-ID-for-interlinked-ID-numbers/m-p/132931" target="_blank"&gt;similar problems&lt;/A&gt; have been addressed with &lt;A href="https://communities.sas.com/t5/tkb/articleprintpage/tkb-id/library/article-id/1045" target="_blank"&gt;PGStats's SubGraphs macro&lt;/A&gt;, which uses only &lt;EM&gt;one&lt;/EM&gt; hash object.&amp;nbsp;Here's how it works on your sample data (using dataset HAVE as KSharp created it):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%SubGraphs(have,out=households);

proc sql;
create table want as
select node as ID, cats('x_',clust+99) as Household_id length=8
from households order by length(ID)&amp;gt;2, clust, node;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The result&amp;nbsp;matches exactly your "&lt;SPAN&gt;final outcome".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Chances are that you could even get away &lt;EM&gt;without&lt;/EM&gt; using hash objects:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Combining-rows-of-data/m-p/259977#M50371" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Combining-rows-of-data/m-p/259977#M50371&lt;/A&gt;&amp;nbsp;(DS2 approach, haven't tested it)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Combining-rows-of-data/m-p/259062#M50047" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Combining-rows-of-data/m-p/259062#M50047&lt;/A&gt;&amp;nbsp;(same thread, iterative macro using PROC SORT, DATA steps and PROC SQL)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Recursive-lookup-for-ID-s/m-p/259763#M50297" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Recursive-lookup-for-ID-s/m-p/259763#M50297&lt;/A&gt;&amp;nbsp;(adapted version of the previous solution, addressed at a problem more similar to yours)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 09 Oct 2018 13:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502677#M134222</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-10-09T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502678#M134223</link>
      <description>&lt;P&gt;I would doubt that PG's code could work for such big table.So is for SAS/OR .&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 13:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502678#M134223</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-10-09T13:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502705#M134229</link>
      <description>&lt;P&gt;Running the above piece of code I'm getting an error saying the dataset households does not exist;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards expandtabs;
input from $  to $ ;
cards;
1	104428	Married 
2	36186	Parent
3	507094	Parent
4	147446	Parent
5	453559	Parent
6	395150	Sibling
7	495697	Married 
8	430549	Parent
9	430304	Married 
10	110819	Married 
11	218256	Married 
12	199523	Married 
13	72263	Parent
14	73282	Married 
15	87799	Parent
16	376709	Parent
17	9042	Married 
18	421753	Parent
19	463196	Sibling
20	97903	Married 
87799	15	Child
376709	16	Child
9042	17	Married 
421753	18	Child
463196	19	Sibling
97903	20	Married
;
run;




%SubGraphs(have,out=households);

proc sql;
create table want as
select node as ID, cats('x_',clust+99) as Household_id length=8
from households order by length(ID)&amp;gt;2, clust, node;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502705#M134229</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-09T14:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502712#M134235</link>
      <description>&lt;P&gt;You &lt;EM&gt;compiled&lt;/EM&gt; macro SubGraphs before calling it, didn't you? That is, you submitted the macro code from &lt;FONT face="courier new,courier"&gt;%macro SubGraphs (...);&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;%mend SubGraphs;&lt;/FONT&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502712#M134235</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-10-09T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502721#M134241</link>
      <description>&lt;P&gt;As in this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro SubGraphs(have,out=households);

proc sql;
create table want as
select node as ID, cats('x_',clust+99) as Household_id length=8
from households order by length(ID)&amp;gt;2, clust, node;
quit;
%mend;
options mlogic mprint;
%SubGraphs;
options nomlogic nomprint;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502721#M134241</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-09T14:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502727#M134244</link>
      <description>&lt;P&gt;No, you need to download the macro code from the page &lt;A href="https://communities.sas.com/t5/tkb/articleprintpage/tkb-id/library/article-id/1045" target="_blank"&gt;https://communities.sas.com/t5/tkb/articleprintpage/tkb-id/library/article-id/1045&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502727#M134244</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-10-09T14:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning individuals to a common household</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502755#M134262</link>
      <description>&lt;P&gt;Thanks for this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program is running but given the size of the dataset I'm hoping it won't crash out again.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-individuals-to-a-common-household/m-p/502755#M134262</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-10-09T15:30:08Z</dc:date>
    </item>
  </channel>
</rss>

