<?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: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163484#M263491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to explain your question more clear. &lt;STRONG&gt;What is your output table ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How to correspond to five inds from table1 to table2 ?&lt;/P&gt;&lt;P&gt;What is "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;their five industries with the most important industries' weights.in table1.&lt;/SPAN&gt;" ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 May 2014 07:25:55 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2014-05-18T07:25:55Z</dc:date>
    <item>
      <title>Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163483#M263490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My table1 looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1116px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="93"&gt;LenderID&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Year&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind1&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind2&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind3&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind4&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind5&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind6&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind7&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind8&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind9&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind10&lt;/TD&gt; &lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0,2&lt;/TD&gt;&lt;TD class="xl67"&gt;0,3&lt;/TD&gt;&lt;TD class="xl67"&gt;0,1&lt;/TD&gt;&lt;TD class="xl67"&gt;0,05&lt;/TD&gt;&lt;TD class="xl67"&gt;0,05&lt;/TD&gt;&lt;TD class="xl67"&gt;0,025&lt;/TD&gt;&lt;TD class="xl67"&gt;0,025&lt;/TD&gt;&lt;TD class="xl67"&gt;0,07&lt;/TD&gt;&lt;TD class="xl67"&gt;0,08&lt;/TD&gt;&lt;TD class="xl67"&gt;0,1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl69"&gt;0,025&lt;/TD&gt;&lt;TD class="xl69"&gt;0,025&lt;/TD&gt;&lt;TD class="xl69"&gt;0,025&lt;/TD&gt;&lt;TD class="xl69"&gt;0,025&lt;/TD&gt;&lt;TD class="xl69"&gt;0,025&lt;/TD&gt;&lt;TD class="xl69"&gt;0,030&lt;/TD&gt;&lt;TD class="xl67"&gt;0,5&lt;/TD&gt;&lt;TD class="xl67"&gt;0,15&lt;/TD&gt;&lt;TD class="xl67"&gt;0,05&lt;/TD&gt;&lt;TD class="xl67"&gt;0,145&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;3&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0,07&lt;/TD&gt;&lt;TD class="xl67"&gt;0,08&lt;/TD&gt;&lt;TD class="xl67"&gt;0,09&lt;/TD&gt;&lt;TD class="xl67"&gt;0,1&lt;/TD&gt;&lt;TD class="xl67"&gt;0,11&lt;/TD&gt;&lt;TD class="xl67"&gt;0,12&lt;/TD&gt;&lt;TD class="xl67"&gt;0,13&lt;/TD&gt;&lt;TD class="xl67"&gt;0,14&lt;/TD&gt;&lt;TD class="xl67"&gt;0,15&lt;/TD&gt;&lt;TD class="xl67"&gt;0,01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;4&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0,08&lt;/TD&gt;&lt;TD class="xl67"&gt;0,24&lt;/TD&gt;&lt;TD class="xl67"&gt;0,29&lt;/TD&gt;&lt;TD class="xl67"&gt;0,13&lt;/TD&gt;&lt;TD class="xl67"&gt;0,05&lt;/TD&gt;&lt;TD class="xl67"&gt;0,04&lt;/TD&gt;&lt;TD class="xl67"&gt;0,06&lt;/TD&gt;&lt;TD class="xl67"&gt;0,07&lt;/TD&gt;&lt;TD class="xl67"&gt;0,02&lt;/TD&gt;&lt;TD class="xl67"&gt;0,02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The summation of Indi, (i=1, 2, ..., 10) egals 1 (100%)&lt;/P&gt;&lt;P&gt;I want that the five industries with the most weights be selected in the table2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2&amp;nbsp; looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1209px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="93"&gt;PackageID&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;LenderID&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;year&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind1&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind2&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind3&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind4&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind5&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind6&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind7&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind8&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind9&lt;/TD&gt;&lt;TD class="xl66" width="93"&gt;Ind10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;56&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;2&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl67"&gt;4&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl67"&gt;6&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl67"&gt;3&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl67"&gt;108&lt;/TD&gt;&lt;TD class="xl67"&gt;1995&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt; &lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;TD class="xl67"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have in this table ten binary variables for each industry. For example, if the borrower's industry is Ind1 then Ind1 is 1, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have approximately 125 000 packageIDs in which one to fifty lenders (LenderID is the identification number) can be present. In total, 70 000 lenders are active (i.e. they participate frequently).&lt;/P&gt;&lt;P&gt;Table1 gives me the information about&amp;nbsp; weights in each industry. I want keep lenderIDs in table2 that corresponds to their five industries with the most important industries' weights.in table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have 18 years so the years must match between the two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if we look at the packageID 1 with the information we see in table1, LenderID 1 can keep his place in table2, LenderID 2 must be eliminated and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That seems complex to code. Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 00:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163483#M263490</guid>
      <dc:creator>windyboo</dc:creator>
      <dc:date>2014-05-18T00:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163484#M263491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to explain your question more clear. &lt;STRONG&gt;What is your output table ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How to correspond to five inds from table1 to table2 ?&lt;/P&gt;&lt;P&gt;What is "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;their five industries with the most important industries' weights.in table1.&lt;/SPAN&gt;" ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 07:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163484#M263491</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-05-18T07:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163485#M263492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank for your response. I was not sure if it was clear enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My output would look like this table:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1120px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&amp;nbsp; &lt;TD class="xl64" height="20" width="80"&gt;PackageID&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;LenderID&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;year&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind1&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind2&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind3&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind4&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind5&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind6&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind7&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind8&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind9&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;Ind10&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;56&lt;/TD&gt;&lt;TD class="xl63"&gt;1995&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;1995&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl63"&gt;3&lt;/TD&gt;&lt;TD class="xl63"&gt;1995&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;2&lt;/TD&gt;&lt;TD class="xl63"&gt;4&lt;/TD&gt;&lt;TD class="xl63"&gt;1995&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.B. Hypothesis 1: The five most weignted industries for LenderID 56 contains Ind2.&lt;/P&gt;&lt;P&gt;Hypothesis 2: The ind8 is not present in the five most weighted industries for LenderIDs 6 and 108.&lt;/P&gt;&lt;P&gt;I specify because we don't see information about these LenderIDs in the table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, the table 1 helps me to select rows (i.e. LenderID)&amp;nbsp; in table 2. The output is the table2 with restrictions on which LenderIDs are still present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case where, for example, a packageID includes three lenders (i. lenderIDs) in the fifth industry (i.e. Ind5) and none of these lenders have the industry 5 in their five most weighted (important) industries, the packageID wouldn't be present at all in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:14:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163485#M263492</guid>
      <dc:creator>windyboo</dc:creator>
      <dc:date>2014-05-19T14:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163486#M263493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question: What is the five industries with the most important industries weights in table1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Response: It can vary from one lender to another. We must maximise the summation of indi=(1, 2, ..., 10) when we pick only five of ten industries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess we must procede in two steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: Create a variable that results in the summation of five industries, the five industries which maximise the sum&lt;/P&gt;&lt;P&gt;Step 2: In a way, create five variables (I'm trying at this moment to figure out the least complicated way to procede. My thinking can be flawed.) which each identifies the five industries retain to maximize the summation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also thinking about other manners to modify my data for minimizing complicated manipulations. I have a huge database so it's not simple. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163486#M263493</guid>
      <dc:creator>windyboo</dc:creator>
      <dc:date>2014-05-19T14:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163487#M263494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question: How to correspond to five inds from table1 to table2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Response: It's a very relevant question. It's my main problem, I guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fact that my table1 expresses industries in terms of weights and my table2 expresses industries in terms of binary variables create a challenge in the process of coding. I must have an intermediate change to make with the data (for example, create other variables ...).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163487#M263494</guid>
      <dc:creator>windyboo</dc:creator>
      <dc:date>2014-05-19T14:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163488#M263495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;windyboo wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Question: What is the five industries with the most important industries weights in table1?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;I think this address the first question what are the top five industries per lenderid per year.&amp;nbsp; I quess that's the question. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; t1;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dsd&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'09'x&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; LenderID&amp;nbsp;&amp;nbsp; Year @;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; ind=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;10&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; w :&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;commax.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; @;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;1&amp;nbsp; 1995&amp;nbsp; 0,2&amp;nbsp;&amp;nbsp; 0,3&amp;nbsp;&amp;nbsp; 0,1&amp;nbsp;&amp;nbsp; 0,05&amp;nbsp; 0,05&amp;nbsp; 0,025 0,025 0,07&amp;nbsp; 0,08&amp;nbsp; 0,1&lt;BR /&gt;2&amp;nbsp; 1995&amp;nbsp; 0,025 0,025 0,025 0,025 0,025 0,030 0,5&amp;nbsp;&amp;nbsp; 0,15&amp;nbsp; 0,05&amp;nbsp; 0,145&lt;BR /&gt;3&amp;nbsp; 1995&amp;nbsp; 0,07&amp;nbsp; 0,08&amp;nbsp; 0,09&amp;nbsp; 0,1&amp;nbsp;&amp;nbsp; 0,11&amp;nbsp; 0,12&amp;nbsp; 0,13&amp;nbsp; 0,14&amp;nbsp; 0,15&amp;nbsp; 0,01&lt;BR /&gt;4&amp;nbsp; 1995&amp;nbsp; 0,08&amp;nbsp; 0,24&amp;nbsp; 0,29&amp;nbsp; 0,13&amp;nbsp; 0,05&amp;nbsp; 0,04&amp;nbsp; 0,06&amp;nbsp; 0,07&amp;nbsp; 0,02&amp;nbsp; 0,02&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sort&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenderid year &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;descending&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; w;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;rank&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=top5(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=(rw le &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;5&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;descending&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenderid year;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; w;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;ranks&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; rw;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163488#M263495</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-05-19T14:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163489#M263496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forget to mention that I use an external file. Is the code following well adjusted for an external file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; name_output;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;infile &lt;/SPAN&gt;'&lt;SPAN class="emph"&gt;&lt;SPAN class="strong"&gt;external-file&lt;/SPAN&gt;&lt;/SPAN&gt;';&amp;nbsp;&amp;nbsp; /* I don't need these options (&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dsd and &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'09'x) if I use an external file (?)&lt;/SPAN&gt;*/&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; LenderID&amp;nbsp; Year @;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; ind=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;to&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;10&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; w :&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;commax.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; @;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; /* I don't need also the part with cards, I think*/&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an error because it creates an empty table (i.e. year, lenderid and w contain '' . '' everywhere).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 17:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163489#M263496</guid>
      <dc:creator>windyboo</dc:creator>
      <dc:date>2014-05-19T17:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163490#M263497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to show some of the records from the external file.&amp;nbsp; Use&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'external-file' obs=20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; list;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and post the lines from the log with fixed font.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 18:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163490#M263497</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-05-19T18:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select five of ten variables in the table1 that correspond to the appropriate binary variables in table2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163491#M263498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I have tried your code:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"C:\Users\eggl2000\Desktop\weights.csv"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; obs=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;list;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Note: 20 records were read from the infile: &lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"C:\Users\eggl2000\Desktop\weights.csv"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;The minimum record length was 27.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;The maximum record length was 74.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;proc print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1040px;"&gt;&lt;TBODY&gt;&lt;TR&gt; (It seems to work. The code ''proc print'' gave me this output. It is my external final csv entirely. ) You must note that I want to choose the top 5 industries ( with the next codes) but many lenders lend to two or three industries maximum. In this case, the code must choose all industries when we count less than five.&lt;/TR&gt;&lt;TR&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" width="80"&gt;&lt;P&gt;LenderID&lt;/P&gt;&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;year&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind1&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind2&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind3&lt;/TD&gt;&amp;nbsp; &lt;TD class="xl64" width="80"&gt;ind4&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind5&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind6&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind7&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind8&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind9&lt;/TD&gt;&lt;TD class="xl64" width="80"&gt;ind10&lt;/TD&gt;&lt;TD class="xl63" width="80"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;36&lt;/TD&gt;&lt;TD class="xl63"&gt;2006&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;36&lt;/TD&gt;&lt;TD class="xl63"&gt;2008&lt;/TD&gt;&lt;TD class="xl63"&gt;0,5&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0,5&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;36&lt;/TD&gt;&lt;TD class="xl63"&gt;2009&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;36&lt;/TD&gt;&lt;TD class="xl63"&gt;2011&lt;/TD&gt;&lt;TD class="xl63"&gt;0,5&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0,5&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;36&lt;/TD&gt;&lt;TD class="xl63"&gt;2012&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0,33333333&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0,66666667&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;309&lt;/TD&gt;&lt;TD class="xl63"&gt;1997&lt;/TD&gt;&lt;TD class="xl63"&gt;0,25&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0,25&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0,5&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;309&lt;/TD&gt;&lt;TD class="xl63"&gt;1998&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;TD class="xl63"&gt;…&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;How the other codes are adapted to this change? We didn't have ''w'' anymore.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Thank you.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-five-of-ten-variables-in-the-table1-that-correspond-to/m-p/163491#M263498</guid>
      <dc:creator>windyboo</dc:creator>
      <dc:date>2014-05-23T14:59:41Z</dc:date>
    </item>
  </channel>
</rss>

