<?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: Removing State from City Column in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696943#M25311</link>
    <description>&lt;P&gt;You are using a dot here&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;City = SCAN(CityState,1,'.');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;while you should be using a comma.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2020 18:06:07 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-11-05T18:06:07Z</dc:date>
    <item>
      <title>Removing State from City Column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696942#M25310</link>
      <description>&lt;P&gt;Good Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if anyone can give me direction on how to remove the state from where my city column is listed.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-05 at 9.42.25 AM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51422i0A34CC67E45AC895/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2020-11-05 at 9.42.25 AM.png" alt="Screen Shot 2020-11-05 at 9.42.25 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;^That is the first data line, I am trying to remove Mississippi and just have Blue Mountain independently.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code,&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA WORK.C;&lt;/P&gt;&lt;P&gt;SET Hyp.C ( KEEP = SocSecNum FirstInit MiddleInit LastInit CityState ZipCd&lt;BR /&gt;RENAME = (SocSecNum = SSN )&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;LENGTH Inits $3&lt;BR /&gt;City $20&lt;BR /&gt;StateCd&lt;SPAN style="font-family: inherit;"&gt;$2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Inits = COMPRESS(CATS(FirstInit, MiddleInit, LastInit), '.');&lt;BR /&gt;&lt;BR /&gt;City = SCAN(CityState,1,'.');&lt;/P&gt;&lt;P&gt;Format StateCd $StateCd.;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the first two observations that my code produces:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-05 at 9.44.13 AM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51423i34C95DE2DE7FD4A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2020-11-05 at 9.44.13 AM.png" alt="Screen Shot 2020-11-05 at 9.44.13 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks in advance for the advice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neeloo&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 15:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696942#M25310</guid>
      <dc:creator>neeloofar</dc:creator>
      <dc:date>2020-12-10T15:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removing State from City Column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696943#M25311</link>
      <description>&lt;P&gt;You are using a dot here&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;City = SCAN(CityState,1,'.');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;while you should be using a comma.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 18:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696943#M25311</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-05T18:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Removing State from City Column</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696944#M25312</link>
      <description>&lt;P&gt;Wow, so simple, I overlooked it, thank you so much!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 18:19:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Removing-State-from-City-Column/m-p/696944#M25312</guid>
      <dc:creator>neeloofar</dc:creator>
      <dc:date>2020-11-05T18:19:14Z</dc:date>
    </item>
  </channel>
</rss>

