<?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: Variable value label Instead of Numbers in Proc SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518544#M140355</link>
    <description>&lt;P&gt;Google &lt;STRONG&gt;proc format&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 19:49:56 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-12-04T19:49:56Z</dc:date>
    <item>
      <title>Variable value label Instead of Numbers in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518543#M140354</link>
      <description>&lt;P&gt;I have a very simple question: how can I label my variable's values, while keeping its values, in proc SQL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, I have in my data Gender, which is 0 and 1.&amp;nbsp;In my regression output I want to display the meaning of 0 and 1 as Female and Male.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my current&amp;nbsp;code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; $sex&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; =&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Female'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Male'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; $race&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'White'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Black'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Other'&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; $yes_no&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'No'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Yes'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WANT&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;distinct&lt;/FONT&gt; &lt;FONT face="Courier New" size="3"&gt;*, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;input(SEX_CD,&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;F8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; numeric_sex format=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;z8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;input(RACE_CD,&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;F8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; numeric_race format=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;z8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;(case&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;when&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; UPPER(t1.'Description'n) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CONTAINS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; UPPER(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'INCOME'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAS_INCOME, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;case&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;when&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; 'ID'n = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Yes"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAS_ID &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAVE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 20:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518543#M140354</guid>
      <dc:creator>altijani</dc:creator>
      <dc:date>2018-12-04T20:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value label Instead of Numbers in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518544#M140355</link>
      <description>&lt;P&gt;Google &lt;STRONG&gt;proc format&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 19:49:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518544#M140355</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-12-04T19:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value label Instead of Numbers in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518577#M140374</link>
      <description>&lt;P&gt;You have already created formats, which is a good first step.&amp;nbsp; You need a slight adjustment to the code, however. For a numeric variable such as GENDER taking on values of 0 and 1, the format name should not begin with a dollar sign.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to label the values when running PROC SQL to create a new data set.&amp;nbsp; You would only need to label the variables later, as part of a procedure that prints a report.&amp;nbsp; That would be the right time to apply a format.&amp;nbsp; If you apply the format as part of PROC SQL, then you need to have the format available any time you try to use the data set.&amp;nbsp; As a general rule, that's a nuisance.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 20:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518577#M140374</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-12-04T20:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value label Instead of Numbers in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518611#M140383</link>
      <description>&lt;P&gt;Apply the format to the variables in the Regression procedure.&lt;/P&gt;
&lt;P&gt;After fixing the numeric/character confusion you currently have with the format definitions.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 00:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/518611#M140383</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-05T00:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value label Instead of Numbers in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/519245#M140607</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sex&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; =&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Female'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Male'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; race&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'White'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Black'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Other'&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; yes_no&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'No'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Yes'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WANT&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;distinct&lt;/FONT&gt; &lt;FONT face="Courier New" size="3"&gt;*, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;input(SEX_CD,sex&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; numeric_sex format=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;z8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;input(RACE_CD,&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;race.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; numeric_race format=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;z8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;(case&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;when&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; UPPER(t1.'Description'n) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CONTAINS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; UPPER(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'INCOME'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAS_INCOME format=yes_no., &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;case&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;when&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; 'ID'n = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Yes"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAS_ID &lt;FONT face="Courier New"&gt;format=yes_no. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAVE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/519245#M140607</guid>
      <dc:creator>altijani</dc:creator>
      <dc:date>2018-12-06T19:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value label Instead of Numbers in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/519251#M140611</link>
      <description>&lt;P&gt;A trick we used to use was to make two format catalogs.&amp;nbsp; One with formats that displayed just the decodes.&amp;nbsp; And a second catalog with the same formats but that this time the decode includes the raw value.&amp;nbsp; Then depending on which you want to use you can just change the FMTSEARCH option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format lib=mylib.formats ;
  value sex
     1='Male' 
     2='Female'
  ;
run;

proc format lib=mylib.cformats ;
  value sex
     1='1 Male' 
     2='2 Female'
  ;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So when developing your code use the CFORMATS catalog and you can see what values to use in your code to select values.&lt;/P&gt;
&lt;P&gt;Then for your final "pretty" report use the regular FORMATS catalog and the number no longer appear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-value-label-Instead-of-Numbers-in-Proc-SQL/m-p/519251#M140611</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-12-06T19:46:31Z</dc:date>
    </item>
  </channel>
</rss>

