<?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: Find an outstanding amount after an event in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94077#M26646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set up an array where the dimension is based on the columns for the shares outstanding for 1997 - 2011. Then use the years variable as the index to pick the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data shr_out;&lt;/P&gt;&lt;P&gt;set dat.shr_out;&lt;/P&gt;&lt;P&gt;array shr_out(1997:2011) _1997--_2011;&lt;/P&gt;&lt;P&gt;float = offer_amount / coalesce( shr_out( years ), shr_out( years+1 ));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The float calculation returns some missing values because your sample does not always have the shares outstanding for the IPO year or the year after.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2012 19:38:45 GMT</pubDate>
    <dc:creator>FloydNevseta</dc:creator>
    <dc:date>2012-04-25T19:38:45Z</dc:date>
    <item>
      <title>Find an outstanding amount after an event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94076#M26645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have a SAS file with the following columns:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;ticker = database company identification code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;years = initial public offering (IPO) year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;ID_HK = identification code for HK database&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;IPO_Date = IPO Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;prospectus_announcement_date = IPO prospectus announcement date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Offer amount = IPO offer amount (million units)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Offer price = IPO Offer price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;1997 - 2011 = are the number of shares outstanding (million units) for each balance sheet dates&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I wish to calculate a variable, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;FLOAT &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;SPAN lang="EN-US" style="font-size: 10pt;"&gt;number of shares publicly offered/ number of shares outstanding after IPO&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; color: #000000;"&gt;= offer amount / shares outstanding after IPO (first Balance sheet after IPO)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;If I define the "&lt;SPAN lang="EN-US" style="font-size: 10pt;"&gt;first Balance sheet after IPO" = IPO Year or one year after IPO year depending on the &lt;/SPAN&gt;number of shares outstanding&amp;nbsp; shares data availability. If the data on IPO Year is available, then the shares outstanding for the IPO year should be used, otherwise the shares outstanding for the one year after IPO. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;How should I produce an output (in columns) as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;ticker = database company identification code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;years = initial public offering (IPO) year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;ID_HK = identification code for HK database&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;IPO_Date = IPO Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;prospectus_announcement_date = IPO prospectus announcement date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Offer amount = IPO offer amount (million units)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Offer price = IPO Offer price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Float =&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10pt;"&gt;offer amount / shares outstanding after IPO (first Balance sheet after IPO)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; color: #000000;"&gt;Thank you for any suggestion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; color: #000000;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; color: #000000;"&gt;mspak&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 13:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94076#M26645</guid>
      <dc:creator>mspak</dc:creator>
      <dc:date>2012-04-25T13:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Find an outstanding amount after an event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94077#M26646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set up an array where the dimension is based on the columns for the shares outstanding for 1997 - 2011. Then use the years variable as the index to pick the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data shr_out;&lt;/P&gt;&lt;P&gt;set dat.shr_out;&lt;/P&gt;&lt;P&gt;array shr_out(1997:2011) _1997--_2011;&lt;/P&gt;&lt;P&gt;float = offer_amount / coalesce( shr_out( years ), shr_out( years+1 ));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The float calculation returns some missing values because your sample does not always have the shares outstanding for the IPO year or the year after.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 19:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94077#M26646</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2012-04-25T19:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Find an outstanding amount after an event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94078#M26647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAS_Bigot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your program. It is the first time I came across the coalesce function in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;mspak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 03:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94078#M26647</guid>
      <dc:creator>mspak</dc:creator>
      <dc:date>2012-04-26T03:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Find an outstanding amount after an event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94079#M26648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As above said, &lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt;"&gt; the &lt;/SPAN&gt;number of shares outstanding&amp;nbsp; might be missing at &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt;"&gt;one year after IPO year &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;So I pick up the first non-missing value after IPO year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;BTW. HK is HongKong ? You come from HK ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;libname x v9 'c:\temp\';
data shr_out(drop=i);
set x.shr_out;
 array shr_out{1997:2011} _1997--_2011;
 do i=lbound(shr_out) to hbound(shr_out);
&amp;nbsp; if not missing(shr_out{i}) and i ge years then do;
&amp;nbsp;&amp;nbsp; float = offer_amount /shr_out{i};
&amp;nbsp;&amp;nbsp; leave;
&amp;nbsp;&amp;nbsp; end;
 end;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Ksharp&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 04:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94079#M26648</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-26T04:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Find an outstanding amount after an event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94080#M26649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your program which help to obtain the first non-missing data and thank you so much for your frequent responses. I found that the missing values are missing for all years (from database). Therefore, I have to fix all the values manually by reading their annual reports. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am from Malaysia but my counter-party for this project is from Hong Kong. We hand-collected some data by employing research assistants both from Malaysia and HK. As such, HK party created their identification code for easy data consolidation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;mspak&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 05:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Find-an-outstanding-amount-after-an-event/m-p/94080#M26649</guid>
      <dc:creator>mspak</dc:creator>
      <dc:date>2012-04-26T05:12:31Z</dc:date>
    </item>
  </channel>
</rss>

