<?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: Setting values for string variable into two categories in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454524#M114884</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;has the right idea.&amp;nbsp; Prior to changing the code, however, you have to make a decision.&amp;nbsp; What should happen if ZipCode has a missing value?&amp;nbsp; Should it be counted in the "OutCounty" category, or should it display as missing (neither "InCounty" nor "OutCounty")?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The proposed solution places missing values in the "OutCounty" category.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2018 18:10:39 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-04-16T18:10:39Z</dc:date>
    <item>
      <title>Setting values for string variable into two categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454521#M114882</link>
      <description>&lt;P&gt;New SAS user, editing an existing (very experienced) user's program. Long story short, when I run the code below, the 'Other' category isn't being printed out, it's just being coded as Frequency Missing. How can I get it to be a value in the frequency table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Relevant coding bits:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Proc format;&lt;/P&gt;&lt;P&gt;VALUE $ZIPFMT ' 48021'='InCounty'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OTHER='OutCounty' ;&lt;/P&gt;&lt;P&gt;Data Students;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set &amp;amp;student;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Format ZipCode $zipfmt.;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Title 'T16: Zip Code';&lt;BR /&gt;Proc Freq data=Students order=formatted;&lt;BR /&gt;Tables ZipCode;&lt;BR /&gt;run;&lt;BR /&gt;Title;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454521#M114882</guid>
      <dc:creator>MariaMTM</dc:creator>
      <dc:date>2018-04-16T18:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Setting values for string variable into two categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454522#M114883</link>
      <description>&lt;P&gt;Add missing to the FREQ statement and see if it shows up correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Title 'T16: Zip Code';
Proc Freq data=Students order=formatted;
Tables ZipCode/missing;
run;
Title;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454522#M114883</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-16T18:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Setting values for string variable into two categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454524#M114884</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;has the right idea.&amp;nbsp; Prior to changing the code, however, you have to make a decision.&amp;nbsp; What should happen if ZipCode has a missing value?&amp;nbsp; Should it be counted in the "OutCounty" category, or should it display as missing (neither "InCounty" nor "OutCounty")?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The proposed solution places missing values in the "OutCounty" category.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454524#M114884</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-16T18:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Setting values for string variable into two categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454528#M114885</link>
      <description>&lt;P&gt;Thank you both so much. I've been trying to resolve this for hours. The code example provided works perfectly for me for this task, but what would I do differently if&amp;nbsp; *did* want OutCounty distinct from missing values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:17:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454528#M114885</guid>
      <dc:creator>MariaMTM</dc:creator>
      <dc:date>2018-04-16T18:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting values for string variable into two categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454531#M114886</link>
      <description>&lt;P&gt;You would have to change the format definition.&amp;nbsp; It currently looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc format;&lt;/P&gt;
&lt;P&gt;VALUE $ZIPFMT ' 48021'='InCounty'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OTHER='OutCounty' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need to add a&amp;nbsp; category:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc format;&lt;/P&gt;
&lt;P&gt;VALUE $ZIPFMT ' 48021'='InCounty'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ' = 'Missing'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OTHER='OutCounty' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure that OTHER= gets defined last.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-values-for-string-variable-into-two-categories/m-p/454531#M114886</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-16T18:25:56Z</dc:date>
    </item>
  </channel>
</rss>

