<?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: Need a macro to find intersections in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739811#M230963</link>
    <description>&lt;P&gt;I tried&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;'s code for smaller dataset, e.g. dataset with only 1 FYEAR, but there is still not enough space for running the code even though I have more than 130 GB free in my disk. I think this code cannot work for a large dataset. Is there anyone who can help with another code, e.g. a macro, please? Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Thierry&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 15:52:45 GMT</pubDate>
    <dc:creator>tritringuyen</dc:creator>
    <dc:date>2021-05-07T15:52:45Z</dc:date>
    <item>
      <title>Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737861#M230076</link>
      <description>&lt;P&gt;Dear SAS users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if someone can help with my need. Basically, I have a large dataset with many companies, many industries, and many years. My simplified task is to find the number of the intersections of a pair of firms (a firm and its rival) in the same industry and same year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gvkey: company ID&lt;/P&gt;&lt;P&gt;Sic: industry&lt;/P&gt;&lt;P&gt;Fyear: year&lt;/P&gt;&lt;P&gt;Item: the name of item (string)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my have data:&lt;/P&gt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D&gt;&lt;P&gt;2010&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;item3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;gvkey3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2010&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;item4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;gvkey3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2010&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;itemn&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable “item” may be different from company to company and may be different in the number of items&amp;nbsp;of the same company from year to year.&amp;nbsp;This example has some companies in 1 industry and 1 year only, but the actual dataset has many.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The want dataset must look like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;gvkey_i&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;gvkey_j&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;sic&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;fyear&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;gvkey_i_total&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;gvkey_j_total&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;number_intersection_gvkey_ij&l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&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;gvkey3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2010&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;gvkey3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;gvkey1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2010&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;gvkey3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;gvkey2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2010&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short, I need to create a matrix of pairs of firms for a number of industries and years. In the want dataset, gvkey_i_total is the total of (non-missing) items, e.g. 3 for gvkey1, 4 for gvkey2, and 5 for gvkey3. The variable gvkey_j_total is the total for the rival firm in the same industry in the same year.&amp;nbsp;The variable number_intersection_gvkey_ij is the interactions of (non-missing) items. In other words, I need to count the number of common items for each pair (gvkey_i and gvkey_j) in the same industry (sic) in the same year (year).&amp;nbsp;For example, gvkey1 and gvkey2 have 2 intersections (item 1 and item n).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think a macro will work best for this. I highly appreciate if you can help. Thank you very much in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Thierry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 11:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737861#M230076</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-04-29T11:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737865#M230077</link>
      <description>&lt;P&gt;Wouldn't it be enough with halv the observations in the 'want' data set?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, obs 1 and obs 3 contain exactly the same observation. The i and j are just reversed?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 11:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737865#M230077</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-04-29T11:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737866#M230078</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13825"&gt;@peter&lt;/a&gt;, yes I need that. There are several steps which follow and I need the pairs for each company. You can see that pair i&amp;amp;j and pair j&amp;amp;i should have the same value. You are correct, but the want dataset needs them. Thank you very much for a quick response. Best, Thierry.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 11:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737866#M230078</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-04-29T11:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737867#M230079</link>
      <description>&lt;P&gt;Ok.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can surely create this. However, when you say "&lt;SPAN&gt;There are several steps which follow", I wonder if there is another end-result here that is the thing we're actually aiming for?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 11:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737867#M230079</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-04-29T11:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737869#M230080</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13825"&gt;@peter&lt;/a&gt;, again thank you for the very quick response! The following steps really depend on the outcome variable "number_intersection_gvkey_ij". For example, I can take the average for each company ID in the same year based on the outcome. I may also have other ways. This is a simplified task and I am struggling to find the intersections. I have been using SAS for some time and I think the rest is not difficult.&lt;BR /&gt;&lt;BR /&gt;Thank you very much!&lt;BR /&gt;Best regards,&lt;BR /&gt;Thierry</description>
      <pubDate>Thu, 29 Apr 2021 11:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/737869#M230080</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-04-29T11:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/738092#M230178</link>
      <description>&lt;P&gt;There may be robust ways to get the gvkeyi/gvkeyj item intersection using proc summary and proc transpose, but none come readily to mind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I offer this DATA step using matrics and a couple hash objects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input gvkey $6.	sic	fyear	item :$5. ;
datalines;
gvkey1	1000	2010	item1
gvkey1	1000	2010	item2
gvkey1	1000	2010	itemn
gvkey2	1000	2010	item1
gvkey2	1000	2010	item3
gvkey2	1000	2010	item4
gvkey2	1000	2010	itemn
gvkey3	1000	2010	item1
gvkey3	1000	2010	item2
gvkey3	1000	2010	item3
gvkey3	1000	2010	item4
gvkey3	1000	2010	itemn
run;

proc sort data=have out=have_srt;
  by sic fyear gvkey item;
run;


data want (keep=gvkeyi gvkeyj sic fyear gvkey_i_total gvkey_j_total ij_intersection) ;
  array _gvkeyid  {200} $6;   /* List of gvkey's for current SIC/FYEAR */
  array _itemcount {200};     /* Count of items by gvkey, for current SIC/FYEAR */
  array _itemmatrix {200,200} $5 ;

  if 0 then set have_srt   /* Establish variables in the PDV, without reading data*/
                have_srt (rename=(gvkey=gvkeyi))
                have_srt (rename=(gvkey=gvkeyj));

  call missing(gvkey_i_total,gvkey_j_total,ij_intersection);
  if _n_=1 then do; 
    declare hash itemlist();   /*gvkey/item Lookup table, within each SIC/FYEAR*/
      itemlist.definekey('gvkey','item');
      itemlist.definedone();

    declare hash ij_count();   /*For counting up gvkeyi/gvkeyj item intersection*/
      ij_count.definekey('gvkeyi','gvkeyj');
      ij_count.definedata('ij_intersection');
      ij_count.definedone();
  end;

  itemlist.clear();
  ij_count.clear();

  do g=1 by 1 until (last.fyear);   /* Read all records for every gvkey in current SIC/FYEAR */
    do i=1 by 1 until (last.gvkey); /* Read each item for current gvkey */
      set have_srt ;
      by sic fyear gvkey;
      _itemmatrix{g,i}=item ;       /* Populate matrix ... */
      itemlist.add();               /* ... and the analogous lookup table  */
    end;
    _gvkeyid{g}=gvkey;
    _itemcount{g}=i;
  end;


  /* Now process the accumulated data for this SIC/FYEAR */
  do i=1 to g;                    /* For each gvkeyi ... */
    gvkeyi=_gvkeyid{i};
    gvkey_i_total=_itemcount{i};
    do j=1 to g;                  /* For each gvkeyj ... */
      if j=i then continue;       /* Skip loop if i=j */
      gvkeyj=_gvkeyid{j};
      gvkey_j_total=_itemcount{j};

      ij_intersection=0;          /* Count common items */
      if j&amp;gt;i then do k=1 to _itemcount{i};
        item=_itemmatrix{i,k};
        if itemlist.find(key:gvkeyj,key:item)=0 then ij_intersection=ij_intersection+1;
      end;
      if j&amp;gt;i then ij_count.add();
      else ij_count.find(key:gvkeyj,key:gvkeyi);
      output;
    end;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Apr 2021 04:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/738092#M230178</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-04-30T04:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/738097#M230181</link>
      <description>&lt;P&gt;If the observations are unique then it seems like a pretty simple self join.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input company $ industry $ fyear item $ ;
cards;
gvkey1 1000 2010 item1
gvkey1 1000 2010 item2
gvkey1 1000 2010 itemn
gvkey2 1000 2010 item1
gvkey2 1000 2010 item3
gvkey2 1000 2010 item4
gvkey2 1000 2010 itemn
gvkey3 1000 2010 item1
gvkey3 1000 2010 item2
gvkey3 1000 2010 item3
gvkey3 1000 2010 item4
gvkey3 1000 2010 itemn
;


proc sql ;
create table want as
select a.company as company1 
     , b.company as company2
     , a.industry 
     , a.fyear
     , count(distinct a.item) as company_total1
     , count(distinct b.item) as company_total2
     , sum( a.item=b.item ) as intersection_total
from have a
full join have b
  on a.industry = b.industry
  and a.fyear = b.fyear 
group by 1,2,3,4
having a.company ne b.company
order by 1,2,3,4
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results&lt;/P&gt;
&lt;PRE&gt;                                                        company_    company_    intersection_
    Obs    company1    company2    industry    fyear     total1      total2         total

     1      gvkey1      gvkey2       1000       2010        3           4             2
     2      gvkey1      gvkey3       1000       2010        3           5             3
     3      gvkey2      gvkey1       1000       2010        4           3             2
     4      gvkey2      gvkey3       1000       2010        4           5             4
     5      gvkey3      gvkey1       1000       2010        5           3             3
     6      gvkey3      gvkey2       1000       2010        5           4             4

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 05:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/738097#M230181</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-30T05:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739449#M230798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;,&amp;nbsp;thank you very for the code which seems to be the solution. However, I run the code and the want dataset has 12 duplications of each company1-company2 (12 same observations for every pair of companies). It can be a problem for a large dataset with several hundred million observations. How to modify the code to remove duplications (rather than proc sort nodupkey after that)? Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&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>Thu, 06 May 2021 11:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739449#M230798</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-06T11:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739450#M230799</link>
      <description>Thank you very much for the code! Cheers, Thierry</description>
      <pubDate>Thu, 06 May 2021 11:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739450#M230799</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-06T11:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739451#M230800</link>
      <description>&lt;P&gt;Subset the data to a couple of the companies that appear to be replicated to make it easier to investigate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will also make two observations for each pair,&amp;nbsp; A-&amp;gt;B and B-&amp;gt;A.&amp;nbsp; If you don't want that then change the having clause comparison operator from NE to LT or GT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code will make multiple observations per company pair if they overlap in multiple industry*fyear combinations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to produce separate observations per industry*fyear then don't include those variables in the results or the group by clause and the values calculated with be the sum across all industries and years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if you want to collapse across industry*fyear in some other way then explain how.&amp;nbsp; Do you want the mean() of the calculated sums across the years?&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 11:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739451#M230800</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-06T11:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739471#M230806</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;. Thank you very much. I revised code and tried but it did not work. The original code above needs a lot of space to run (I tried a sample of 10m observations for 10 years and my disk has more than 130 GB free, but it runs out of space after 20 minutes running the code). In general, I believe that your code works. I wonder if you could do a favor for me, e.g. modifying it so that it can work efficiently.&lt;BR /&gt;&lt;BR /&gt;You can imagine that my dataset has a lot industry-year (the above test is only 10 years). That is what I think a macro is best. For example, something like a macro to split dataset into industry-fyear subsamples and the run the code for each submsample (also, 11 duplications for each pair need to be removed as well). A macro might work I think.&lt;BR /&gt;&lt;BR /&gt;Thank you very much!&lt;BR /&gt;Best regards,&lt;BR /&gt;Thierry&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 13:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739471#M230806</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-06T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739490#M230810</link>
      <description>&lt;P&gt;Since you are not linking companies across years, why not do one year at a time.&amp;nbsp; If your data covers 10 equally populated years, you've cut your resource demands by 90% for each run.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And doing so is easy.&amp;nbsp; For 2011, in every place you use a dataset name (like "have"), just use "have (where=(fyear=2011))".&amp;nbsp; Then you wouldn't even need to drop fyear from any other parts of your code, like the "a.fyear=b.fyear" condition or the "group by" expression.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 14:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739490#M230810</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-05-06T14:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739495#M230811</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;, thank you very much! I have tried with one year with nearly 1m observations and there is still not enough space to run it. Anyway, thank you very much! I will try another way to see how it works. Thank you.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Thierry&lt;BR /&gt;</description>
      <pubDate>Thu, 06 May 2021 14:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739495#M230811</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-06T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739811#M230963</link>
      <description>&lt;P&gt;I tried&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;'s code for smaller dataset, e.g. dataset with only 1 FYEAR, but there is still not enough space for running the code even though I have more than 130 GB free in my disk. I think this code cannot work for a large dataset. Is there anyone who can help with another code, e.g. a macro, please? Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Thierry&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739811#M230963</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-07T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739968#M231055</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/62534"&gt;@tritringuyen&lt;/a&gt;&amp;nbsp;have you tried&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;s hash object approach?&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 14:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739968#M231055</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-05-08T14:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739976#M231057</link>
      <description>Hi Peter, it does not work.</description>
      <pubDate>Sat, 08 May 2021 16:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739976#M231057</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-08T16:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739979#M231058</link>
      <description>&lt;P&gt;You didn't answer the question about whether or not you need the INDUSTY and FYEAR as separate sets of observations per COMPANY PAIR.&amp;nbsp; If so then please supply some example data and expected output that demonstrates data of that type and how you want it summarized.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please clarify how large your data actually is.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the types and lengths of the variables used in the analysis&lt;BR /&gt;How many total observations?&lt;BR /&gt;How many distinct COMPANY ids?&lt;/P&gt;
&lt;P&gt;How many distinct ITEM codes?&lt;/P&gt;
&lt;P&gt;How any distinct INDUSTRY codes?&lt;/P&gt;
&lt;P&gt;How many FYEAR values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where does the dataset live?&amp;nbsp; Is it actually a SAS dataset? Or are you connecting to some external database?&lt;/P&gt;
&lt;P&gt;If it is a SAS dataset does it live on a disk on the SAS computer? Or a shared disk?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there any duplicate observations? That is same COMPANY, INDUSTRY, FYEAR, ITEM values?&amp;nbsp; If so then making a dataset with just one observation per each might be the first step towards improved performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really need to process by INDUSTRY*FYEAR then you could subset the problem along those dimensions and re-run separate queries for each.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if the problem is too large for the simple SQL join then perhaps a custom SAS data step solution could be faster.&amp;nbsp; The sizes will matter whether HASH objects or even simple ARRAYs could help in the summarization.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 16:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739979#M231058</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-08T16:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739988#M231064</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/62534"&gt;@tritringuyen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Peter, it does not work.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What does "it does not work" mean?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It ran out of resources?&lt;/P&gt;
&lt;P&gt;It produced erroneous results?&lt;/P&gt;
&lt;P&gt;It generated error messages and stopped?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the time has come for you provide some more information to help us help you.&amp;nbsp; A good starting point would be&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;'s questions.&amp;nbsp; &amp;nbsp;And I, for one, would need to see the sas log and the code that produced it to be confident that I am understanding all the relevant issues for this task.&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 18:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739988#M231064</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-05-08T18:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739990#M231065</link>
      <description>&lt;P&gt;Another comment, this time on the substance of the task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SIC code is a 4-digit code.&amp;nbsp; Although not every SIC code is assigned to an industry, you are probably dealing with at least a couple hundred SIC values, some of which will have very few GVKEYs.&amp;nbsp; &amp;nbsp;Before you go down this rabbit hole a lot more, are you convinced that you should not first be collapsing the SIC codes?&amp;nbsp; Perhaps just use the first 2 (or even first 3) digits.&amp;nbsp; &amp;nbsp;(And remember the first 3 digits of SIC code 161&amp;nbsp; are 016).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 19:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739990#M231065</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-05-08T19:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need a macro to find intersections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739999#M231073</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;, thank you for your response. Please find below for the SAS log when I run your code. The problem might be that my SAS system (windows) is too old and there might be some functions not available.&lt;BR /&gt;&lt;BR /&gt;The advantage of your code is that it is very fast.&lt;BR /&gt;&lt;BR /&gt;I will come back to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; soon.&lt;BR /&gt;&lt;BR /&gt;Thank you very much!&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;***&lt;BR /&gt;&lt;BR /&gt;NOTE: PROCEDURE PRINTTO used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;141 data have;&lt;BR /&gt;142 input gvkey $6. sic fyear item :$5. ;&lt;BR /&gt;143 datalines;&lt;BR /&gt;&lt;BR /&gt;NOTE: The data set WORK.HAVE has 12 observations and 4 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;156 run;&lt;BR /&gt;157 proc sort data=have out=have_srt;&lt;BR /&gt;158 by sic fyear gvkey item;&lt;BR /&gt;159 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: SAS threaded sort was used.&lt;BR /&gt;NOTE: There were 12 observations read from the data set WORK.HAVE.&lt;BR /&gt;NOTE: The data set WORK.HAVE_SRT has 12 observations and 4 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;160 data want (keep=gvkeyi gvkeyj sic fyear gvkey_i_total gvkey_j_total&lt;BR /&gt;160! ij_intersection) ;&lt;BR /&gt;161 array _gvkeyid {200} $6; /* List of gvkey's for current SIC/FYEAR */&lt;BR /&gt;162 array _itemcount {200}; /* Count of items by gvkey, for current&lt;BR /&gt;162! SIC/FYEAR */&lt;BR /&gt;163 array _itemmatrix {200,200} $5 ;&lt;BR /&gt;164 if 0 then set have_srt /* Establish variables in the PDV, without&lt;BR /&gt;164! reading data*/&lt;BR /&gt;165 have_srt (rename=(gvkey=gvkeyi))&lt;BR /&gt;166 have_srt (rename=(gvkey=gvkeyj));&lt;BR /&gt;167 call missing(gvkey_i_total,gvkey_j_total,ij_intersection);&lt;BR /&gt;168 if _n_=1 then do;&lt;BR /&gt;169 declare hash itemlist(); /*gvkey/item Lookup table, within each&lt;BR /&gt;169! SIC/FYEAR*/&lt;BR /&gt;170 itemlist.definekey('gvkey','item');&lt;BR /&gt;171 itemlist.definedone();&lt;BR /&gt;172 declare hash ij_count(); /*For counting up gvkeyi/gvkeyj item&lt;BR /&gt;172! intersection*/&lt;BR /&gt;173 ij_count.definekey('gvkeyi','gvkeyj');&lt;BR /&gt;174 ij_count.definedata('ij_intersection');&lt;BR /&gt;175 ij_count.definedone();&lt;BR /&gt;176 end;&lt;BR /&gt;177 itemlist.clear();&lt;BR /&gt;178 ij_count.clear();&lt;BR /&gt;179 do g=1 by 1 until (last.fyear); /* Read all records for every gvkey&lt;BR /&gt;179! in current SIC/FYEAR */&lt;BR /&gt;180 do i=1 by 1 until (last.gvkey); /* Read each item for current gvkey&lt;BR /&gt;180! */&lt;BR /&gt;181 set have_srt ;&lt;BR /&gt;182 by sic fyear gvkey;&lt;BR /&gt;183 _itemmatrix{g,i}=item ; /* Populate matrix ... */&lt;BR /&gt;184 itemlist.add(); /* ... and the analogous lookup table&lt;BR /&gt;184! */&lt;BR /&gt;185 end;&lt;BR /&gt;186 _gvkeyid{g}=gvkey;&lt;BR /&gt;187 _itemcount{g}=i;&lt;BR /&gt;188 end;&lt;BR /&gt;189 /* Now process the accumulated data for this SIC/FYEAR */&lt;BR /&gt;190 do i=1 to g; /* For each gvkeyi ... */&lt;BR /&gt;191 gvkeyi=_gvkeyid{i};&lt;BR /&gt;192 gvkey_i_total=_itemcount{i};&lt;BR /&gt;193 do j=1 to g; /* For each gvkeyj ... */&lt;BR /&gt;194 if j=i then continue; /* Skip loop if i=j */&lt;BR /&gt;195 gvkeyj=_gvkeyid{j};&lt;BR /&gt;196 gvkey_j_total=_itemcount{j};&lt;BR /&gt;197 ij_intersection=0; /* Count common items */&lt;BR /&gt;198 if j&amp;gt;i then do k=1 to _itemcount{i};&lt;BR /&gt;199 item=_itemmatrix{i,k};&lt;BR /&gt;200 if itemlist.find(key:gvkeyj,key:item)=0 then&lt;BR /&gt;200! ij_intersection=ij_intersection+1;&lt;BR /&gt;201 end;&lt;BR /&gt;202 if j&amp;gt;i then ij_count.add();&lt;BR /&gt;203 else ij_count.find(key:gvkeyj,key:gvkeyi);&lt;BR /&gt;204 output;&lt;BR /&gt;205 end;&lt;BR /&gt;206 end;&lt;BR /&gt;207 run;&lt;BR /&gt;&lt;BR /&gt;ERROR: Could not find method.&lt;BR /&gt;ERROR: Could not find method.&lt;BR /&gt;ERROR: Could not find method.&lt;BR /&gt;ERROR: Could not find method.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 12 observations read from the data set WORK.HAVE_SRT.&lt;BR /&gt;WARNING: The data set WORK.WANT may be incomplete. When this step was&lt;BR /&gt;stopped there were 6 observations and 7 variables.&lt;BR /&gt;WARNING: Data set WORK.WANT was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.12 seconds&lt;BR /&gt;cpu time 0.12 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 08 May 2021 20:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-macro-to-find-intersections/m-p/739999#M231073</guid>
      <dc:creator>tritringuyen</dc:creator>
      <dc:date>2021-05-08T20:08:34Z</dc:date>
    </item>
  </channel>
</rss>

