<?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: assign &amp;quot;Yes&amp;quot; &amp;quot;No&amp;quot; to variables. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63245#M17965</link>
    <description>Hint: If you want to have the format available all the time put it in a permanent library by adding the LIBRARY=  &lt;LIBNAME&gt; option to the PROC step. Reference e that library in the format search path using the FMTSEARCH system option or other tool.&lt;/LIBNAME&gt;</description>
    <pubDate>Fri, 06 May 2011 20:48:30 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2011-05-06T20:48:30Z</dc:date>
    <item>
      <title>assign "Yes" "No" to variables.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63243#M17963</link>
      <description>I have several binary variables (1, 2). I tried to label them all to "Yes, No".&lt;BR /&gt;
Is there any easier way to do this? I remember I used "format" statement before, but cannot recall how i did that. Don't want to use "if then" statement, too many variables.&lt;BR /&gt;
Any help? thanks!</description>
      <pubDate>Fri, 06 May 2011 19:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63243#M17963</guid>
      <dc:creator>Ken_oy</dc:creator>
      <dc:date>2011-05-06T19:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: assign "Yes" "No" to variables.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63244#M17964</link>
      <description>Hello Ken_oy,&lt;BR /&gt;
&lt;BR /&gt;
This is a solution:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data a;&lt;BR /&gt;
  bin=1; output;&lt;BR /&gt;
  bin=2; output;&lt;BR /&gt;
  bin=.; output;&lt;BR /&gt;
run;&lt;BR /&gt;
proc format;&lt;BR /&gt;
  value bin&lt;BR /&gt;
    1=    "Yes"&lt;BR /&gt;
    2=    "No "&lt;BR /&gt;
    other="Unk";&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data=a;&lt;BR /&gt;
  format bin bin.;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Fri, 06 May 2011 20:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63244#M17964</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-05-06T20:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: assign "Yes" "No" to variables.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63245#M17965</link>
      <description>Hint: If you want to have the format available all the time put it in a permanent library by adding the LIBRARY=  &lt;LIBNAME&gt; option to the PROC step. Reference e that library in the format search path using the FMTSEARCH system option or other tool.&lt;/LIBNAME&gt;</description>
      <pubDate>Fri, 06 May 2011 20:48:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/assign-quot-Yes-quot-quot-No-quot-to-variables/m-p/63245#M17965</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-05-06T20:48:30Z</dc:date>
    </item>
  </channel>
</rss>

