<?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: Parsing HTML with SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78903#M17058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Be more precise in what you search for?&amp;nbsp; I see this in the source for AAPL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: medium;"&gt;Long Term Debt&lt;/SPAN&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: medium;"&gt;Short/Current Long Term Debt&lt;/SPAN&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;So if you search for them with he leading &amp;gt; (from the &amp;lt;td&amp;gt; tag) then it will be unique.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2013 21:33:00 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-06-06T21:33:00Z</dc:date>
    <item>
      <title>Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78896#M17051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;I'm trying to use SAS to acquire data from the internet.&amp;nbsp; More specifically, I'm interested in financial data on publicly traded companies.&amp;nbsp; I have code which downloads the financial information.&amp;nbsp; This part works fine.&amp;nbsp; The issue is that the data may span across several observations.&amp;nbsp; My plan to is tag all the observations with relevant data and then use proc transpose to combine the multiple observations into one observation where I can use nested if statements and substrate/index functions to extract the information.&amp;nbsp; I'm attempting to use a DO UNTIL loop to mark the records with relevant information, but can't get it to work properly.&amp;nbsp; My program crashes whenever the data spans across more than one observation.&amp;nbsp; Please see my code below.&amp;nbsp; Does anyone have an idea of what I'm doing wrong?&amp;nbsp; Any help or advice would be greatly appreciated.&amp;nbsp; Thanks so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Bill&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;*DOWNLOAD FINANCIAL DATA;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;SPAN&gt;filename in url '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://finance.yahoo.com/q/bs?s=AAPL"&gt;http://finance.yahoo.com/q/bs?s=AAPL&lt;/A&gt;&lt;SPAN&gt;' debug lrecl=8192;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;DATA OUT.YAHOO_HTML;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;infile in length=len;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;input record $varying8192. len;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;*PARSE HTML;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;%MACRO BAL_SHEET_ITEM(YAHOO_NAME,SAS_NAME);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;DATA OUT.&amp;amp;SAS_NAME.1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;SET OUT.YAHOO_HTML;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;SYMBOL='AAPL';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;*LIMIT DATA SET TO RECORDS WITH RELEVANT INFO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;KEEPDATA = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;%LET BEG_DATA=INDEX(record,&amp;amp;YAHOO_NAME.); /* BEGINNING OF DATA*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;%LET END_DATA=index(record,'&amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;');/*END OF DATA*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;IF &amp;amp;BEG_DATA. &amp;gt; 0 THEN DO UNTIL (&amp;amp;END_DATA.&amp;gt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;KEEPDATA=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;END; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;IF KEEPDATA=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;%MEND;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Cash And Cash Equivalents',CASH_AND_EQUIV);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Inventory',INVENTORY);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Short Term Investments',SHORT_TERM_ASSETS);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Net Receivables',NET_REC);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Inventory',INVENTORY);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Other Current Assets',OTH_CURR_ASSETS);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Accounts Payable',ACCTS_PAYABLE);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Short/Current Long Term Debt',SHORT_CURR_LT_DEBT);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Other Current Liabilities',OTH_CURR_LIAB);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Long Term Debt',LT_DEBT);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Other Liabilities',OTH_LIAB);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Deferred Long Term Liability Charges',DEF_LT_LIAB);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Minority Interest',MIN_INT);&lt;/P&gt;&lt;P&gt;%BAL_SHEET_ITEM('Negative Goodwill',NEG_GOODWILL);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2013 08:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78896#M17051</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2013-05-18T08:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78897#M17052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not let SAS input statement handle it for you instead of stuffing the html into a character variable?&lt;/P&gt;&lt;P&gt;For example to get the column headers you could use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data headers ;&lt;/P&gt;&lt;P&gt;infile in flowover ;&lt;/P&gt;&lt;P&gt;input @'Period Ending' @;&lt;/P&gt;&lt;P&gt;array datestr(4) $12 ;&lt;/P&gt;&lt;P&gt;do col=1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input @ '&amp;lt;b&amp;gt;'&amp;nbsp; datestr(col) $12. @;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the problem is that key text fields like "Period Ending" is flowed across rows then perhaps you can pull in the file and write it back out without the end of line breaks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can begin to automate it by making the SYMBOL used in the URL a macro variable.&lt;/P&gt;&lt;P&gt;For the numbers you might need to first read in the value as a character string and then parse it to eliminate '&amp;amp;nbsp' or other HTML codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let symbol=AAPL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN&gt;filename in url "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://finance.yahoo.com:80/q/bs?s=&amp;amp;symbol"&gt;http://finance.yahoo.com:80/q/bs?s=&amp;amp;symbol&lt;/A&gt;&lt;SPAN&gt;" lrecl=8192;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data cash ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;infile in flowover ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;symbol="&amp;amp;symbol";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;input @'Cash And Cash Equivalents' @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;array cash (4) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;do col=1 to 4;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; input @ '&amp;lt;td align="right"&amp;gt;'&amp;nbsp; string $12. @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; cash(col)=input(scan(string,1,'&amp;amp;&amp;lt;'),??comma12.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;stop;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;drop col string;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; set ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; put (_all_) (=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;symbol=AAPL cash1=12053000 cash2=10746000 cash3=27084000 cash4=18383000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2013 18:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78897#M17052</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-05-18T18:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78898#M17053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Wow, thank you so much.&amp;nbsp; The code works great.&amp;nbsp; Your solution is way more efficient than what I had in mind.&amp;nbsp; Evidently, I must have sustained a severe head injury prior to thinking about this problem???&amp;nbsp; I'm busy modifying the code to combine and then transpose the data with the purpose of creating one table that has the symbol, balance sheet items, and financial statement dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks again for your assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;-Bill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2013 23:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78898#M17053</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2013-05-18T23:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78899#M17054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quick follow-up question: one of the balance sheet items (Long Term Debt) is completely contained in another balance sheet item (&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Short/Current Long Term Debt&lt;/SPAN&gt;).&amp;nbsp; I want both of these variables.&amp;nbsp; Whenever I run the code the code below, I cannot download the values for 'Long Term Debt' since '&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Short/Current Long Term Debt' comes first in the HTML.&amp;nbsp; The code pulls in the values for '&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Short/Current Long Term Debt' instead of 'Long Term Debt'.&amp;nbsp; Does anyone have any suggestions on how to handle this type of &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;situation?&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;Is there an option in the INPUT statement that will allow me to select the 2nd instance of a phrase?&amp;nbsp; Any help would be greatly &lt;/SPAN&gt;&lt;SPAN style="line-height: 19.5px;"&gt;appreciated&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Bill&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit; background-color: #ffffff; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit; background-color: #ffffff; font-size: 10pt; line-height: 1.5em;"&gt;%let symbol=AAPL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;filename in url "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://finance.yahoo.com/q/bs?s=&amp;amp;symbol" style="font-style: inherit; font-family: inherit; color: #0e66ba;"&gt;http://finance.yahoo.com:80/q/bs?s=&amp;amp;symbol&lt;/A&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;" lrecl=8192;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;data cash ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;infile in flowover ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;symbol="&amp;amp;symbol";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;input @'Long Term Debt' @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;array cash (4) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;do col=1 to 4;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; input @ '&amp;lt;td align="right"&amp;gt;'&amp;nbsp; string $12. @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; cash(col)=input(scan(string,1,'&amp;amp;&amp;lt;'),??comma12.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;stop;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;drop col string;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 08:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78899#M17054</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2013-06-05T08:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78900#M17055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Repeat that INPUT @'Long Term ' before loading the variables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 17:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78900#M17055</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-06-05T17:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78901#M17056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the suggestion.&amp;nbsp; It solved the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 09:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78901#M17056</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2013-06-06T09:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78902#M17057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One other caution. It is definitely possible for HTML to exceed 8192 bytes. Whenever I pull it in, I stuff it into a 32767 character field, and then reduce it once I know what the max record length is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom (the other Tom, that is!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 19:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78902#M17057</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-06-06T19:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78903#M17058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Be more precise in what you search for?&amp;nbsp; I see this in the source for AAPL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: medium;"&gt;Long Term Debt&lt;/SPAN&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace; font-size: medium;"&gt;Short/Current Long Term Debt&lt;/SPAN&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="webkit-html-tag" style="font-family: monospace; font-size: medium;"&gt;So if you search for them with he leading &amp;gt; (from the &amp;lt;td&amp;gt; tag) then it will be unique.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 21:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78903#M17058</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-06-06T21:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing HTML with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78904#M17059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the comments.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom K. - Good to know.&amp;nbsp; For the webpage in question, the record length of 8192 appears to be working fine.&amp;nbsp; I'll keep your suggestion in mind when I start to branch out and look at other webpages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom - I like your solution.&amp;nbsp; Currently I use an IF statement to determine when to repeat the input command.&amp;nbsp; I'll change my code to be more precise in my search which should improve execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 05:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parsing-HTML-with-SAS/m-p/78904#M17059</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2013-06-09T05:34:31Z</dc:date>
    </item>
  </channel>
</rss>

