<?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: why is the LOG showing error when I have entered numeric values for the variable (Ques1-ques5)? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436064#M108409</link>
    <description>&lt;P&gt;You created the format with the character one, '1', not the numeric value 1, 1 (no quotes). Remove the quotes and it should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;   &lt;SPAN class="token keyword"&gt;value&lt;/SPAN&gt; ques &lt;SPAN class="token string"&gt;'1'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Strongly disagree'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'2'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Disagree'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'3'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'No opinion'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'4'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Agree'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'5'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Strongly agree'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181031"&gt;@b384b7&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data user_format;
input ID : $3. gender$ age salary (ques1-ques5);
datalines;
  001 M 23 28000 1 2 1 2 3
  002 F 55 76123 4 5 2 1 1
  003 M 38 36500 2 2 2 2 1
  004 F 67 128000 5 3 2 2 4
  005 M 22 23060 3 3 3 4 2
  006 M 63 90000 2 3 5 4 3
  007 F 45 76100 5 3 4 3 3 
run;
  
  proc format;
   value $gender 'M' = 'Male'
                 'F' = 'Female'
                 ' ' = 'Not entered'
                 other = 'Miscoded';
   value age  low-29 = 'Less than 29'
                    30-50 = '30 to 50'
                    51-high = '51+';
   value ques '1' = 'Strongly disagree'
                     '2' = 'Disagree'
                     '3' = 'No opinion'
                     '4' = 'Agree'
                     '5' = 'Strongly agree';
 proc print data=user_format;
 id ID;
 var gender age ques1-ques5;
 format gender $gender.
        age age.
        ques1-ques5 ques.;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.png" style="width: 628px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18452i5BE38D0475BFC6A3/image-dimensions/628x354?v=v2" width="628" height="354" role="button" title="sas.png" alt="sas.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Feb 2018 04:51:28 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-11T04:51:28Z</dc:date>
    <item>
      <title>why is the LOG showing error when I have entered numeric values for the variable (Ques1-ques5)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436063#M108408</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data user_format;
input ID : $3. gender$ age salary (ques1-ques5);
datalines;
  001 M 23 28000 1 2 1 2 3
  002 F 55 76123 4 5 2 1 1
  003 M 38 36500 2 2 2 2 1
  004 F 67 128000 5 3 2 2 4
  005 M 22 23060 3 3 3 4 2
  006 M 63 90000 2 3 5 4 3
  007 F 45 76100 5 3 4 3 3 
run;
  
  proc format;
   value $gender 'M' = 'Male'
                 'F' = 'Female'
                 ' ' = 'Not entered'
                 other = 'Miscoded';
   value age  low-29 = 'Less than 29'
                    30-50 = '30 to 50'
                    51-high = '51+';
   value ques '1' = 'Strongly disagree'
                     '2' = 'Disagree'
                     '3' = 'No opinion'
                     '4' = 'Agree'
                     '5' = 'Strongly agree';
 proc print data=user_format;
 id ID;
 var gender age ques1-ques5;
 format gender $gender.
        age age.
        ques1-ques5 ques.;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.png" style="width: 628px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18452i5BE38D0475BFC6A3/image-dimensions/628x354?v=v2" width="628" height="354" role="button" title="sas.png" alt="sas.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 04:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436063#M108408</guid>
      <dc:creator>b384b7</dc:creator>
      <dc:date>2018-02-11T04:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: why is the LOG showing error when I have entered numeric values for the variable (Ques1-ques5)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436064#M108409</link>
      <description>&lt;P&gt;You created the format with the character one, '1', not the numeric value 1, 1 (no quotes). Remove the quotes and it should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;   &lt;SPAN class="token keyword"&gt;value&lt;/SPAN&gt; ques &lt;SPAN class="token string"&gt;'1'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Strongly disagree'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'2'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Disagree'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'3'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'No opinion'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'4'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Agree'&lt;/SPAN&gt;
                     &lt;SPAN class="token string"&gt;'5'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Strongly agree'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181031"&gt;@b384b7&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data user_format;
input ID : $3. gender$ age salary (ques1-ques5);
datalines;
  001 M 23 28000 1 2 1 2 3
  002 F 55 76123 4 5 2 1 1
  003 M 38 36500 2 2 2 2 1
  004 F 67 128000 5 3 2 2 4
  005 M 22 23060 3 3 3 4 2
  006 M 63 90000 2 3 5 4 3
  007 F 45 76100 5 3 4 3 3 
run;
  
  proc format;
   value $gender 'M' = 'Male'
                 'F' = 'Female'
                 ' ' = 'Not entered'
                 other = 'Miscoded';
   value age  low-29 = 'Less than 29'
                    30-50 = '30 to 50'
                    51-high = '51+';
   value ques '1' = 'Strongly disagree'
                     '2' = 'Disagree'
                     '3' = 'No opinion'
                     '4' = 'Agree'
                     '5' = 'Strongly agree';
 proc print data=user_format;
 id ID;
 var gender age ques1-ques5;
 format gender $gender.
        age age.
        ques1-ques5 ques.;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.png" style="width: 628px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18452i5BE38D0475BFC6A3/image-dimensions/628x354?v=v2" width="628" height="354" role="button" title="sas.png" alt="sas.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 04:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436064#M108409</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-11T04:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: why is the LOG showing error when I have entered numeric values for the variable (Ques1-ques5)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436070#M108411</link>
      <description>&lt;P&gt;Thank you so much. It worked.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 05:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-is-the-LOG-showing-error-when-I-have-entered-numeric-values/m-p/436070#M108411</guid>
      <dc:creator>b384b7</dc:creator>
      <dc:date>2018-02-11T05:21:39Z</dc:date>
    </item>
  </channel>
</rss>

