<?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: Separate City and State in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133607#M27144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Nov 2013 04:05:52 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2013-11-07T04:05:52Z</dc:date>
    <item>
      <title>Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133597#M27134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a column that has city and state together. How to separate them?I used scan function.But there are many ways in which the data is stored as shown below:&lt;/P&gt;&lt;P&gt;EAST TEMPLETO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MA&lt;/P&gt;&lt;P&gt;ST. PETE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; One thing that is definete is , scan(variable_name,-1,'') is giving me state, but the issue is with City,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 18:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133597#M27134</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-11-06T18:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133598#M27135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you assume that everything except the last word (state) is the city?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 18:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133598#M27135</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-11-06T18:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133599#M27136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 18:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133599#M27136</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-11-06T18:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133600#M27137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then all you need to know if the column number of the character (blank) that is just before the last word.&amp;nbsp; Maybe ANYBLANK with negative start.&amp;nbsp; Is any blank a function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 18:28:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133600#M27137</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-11-06T18:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133601#M27138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another hint.&amp;nbsp; RTM about the CALL version of SCAN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 18:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133601#M27138</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-11-06T18:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133602#M27139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're saying you can extract STATE.&amp;nbsp; Then it should be easy enough to get CITY:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;city = substr(original_variable, 1, length(original_variable) - length(state));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that this code gives CITY a length of $200.&amp;nbsp; You may want to set a shorter length before adding this statement.&amp;nbsp; If the length of CITY might vary from data set to data set, you could always try this first:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;city = original_variable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice from data _null_ that inclues RTFM is best heeded.&amp;nbsp; A more complex problem would require better tools than SUBSTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 19:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133602#M27139</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-11-06T19:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133603#M27140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was hopping that &lt;A __default_attr="504807" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; would RTM and come back with this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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; city;&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;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; addline3 &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$40.&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;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; scan(addline3,-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,s,l);&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;length&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; city $&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; state $&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; city = substr(addline3,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,s-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&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; state = substr(addline3,s);&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;EAST TEMPLETO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MA&lt;BR /&gt;ST. PETE&amp;nbsp;&amp;nbsp; FL&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;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 19:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133603#M27140</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-11-06T19:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133604#M27141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I run this, i get an error invalid thrid argument for substr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 22:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133604#M27141</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-11-06T22:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133605#M27142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming the states are always two character the following codes would help(tested correct).&lt;/P&gt;&lt;P&gt;Otherwise look for the position of the spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have1;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; city_state1=compbl(city_state||'*');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j=index(city_state1,'*');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state=substr(city_state1,j-3,j-2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; city=substr(city_state1,1,j-4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state=tranwrd(state,'*','');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop&amp;nbsp; city_state1 j;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;TABLE border="1" cellpadding="2" cellspacing="1" width="458"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;city_state&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;city_state1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;j&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;state&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;city&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Montgomery AL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Montgomery AL *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;AL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Montgomery&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Juneau AK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Juneau AK *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;AK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Juneau&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Phoenix AZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Phoenix AZ *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;AZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Phoenix&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Little Rock AR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Little Rock AR *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;AR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Little Rock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Sacramento CA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Sacramento CA *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;CA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Sacramento&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Denver CO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Denver CO *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;CO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Denver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Hartford CT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Hartford CT *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;CT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Hartford&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Dover DE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Dover DE *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;DE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Dover&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="28%"&gt;&lt;BR /&gt;&lt;P&gt;Tallahassee FL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="30%"&gt;&lt;BR /&gt;&lt;P&gt;Tallahassee FL *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="9%"&gt;&lt;BR /&gt;&lt;P&gt;FL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;Tallahassee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 01:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133605#M27142</guid>
      <dc:creator>Mit</dc:creator>
      <dc:date>2013-11-07T01:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133606#M27143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide an example where you get such an error using data_null_'s suggested code?&amp;nbsp; I can only imagine that happening if you have a blank line, or only a city or state, but you've already stated that state will always be the last text.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 01:51:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133606#M27143</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-11-07T01:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133607#M27144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 04:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133607#M27144</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-11-07T04:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133608#M27145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;show your work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 11:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133608#M27145</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-11-07T11:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Separate City and State</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133609#M27146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Here is my try...Might be it will same as others' logic...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; have(drop = position length);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; test_var &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;$50.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; state &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;$5.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; city &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;$20.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; state = scan(test_var,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;" "&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; scan(test_var,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;,position,length);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; city = substr(test_var,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;,(position-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;cards4&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 11pt;"&gt;EAST TEMPLETO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 11pt;"&gt;ST. PETE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;-Urvish&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 13:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Separate-City-and-State/m-p/133609#M27146</guid>
      <dc:creator>UrvishShah</dc:creator>
      <dc:date>2013-11-07T13:35:49Z</dc:date>
    </item>
  </channel>
</rss>

