<?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: how to change data value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545149#M74276</link>
    <description>&lt;P&gt;So, just to be clear, what does your desired result look like?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2019 07:39:41 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-03-22T07:39:41Z</dc:date>
    <item>
      <title>how to change data value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545148#M74275</link>
      <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;Hello every one&amp;nbsp;&lt;/P&gt;&lt;P&gt;I m cleaning my data but i confronted an issue which is&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have variable data it is like multi response data (means there are more than one value for some observations)&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;obs&amp;nbsp; &amp;nbsp;variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,3,4&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2,8,9&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Here, i need to change the value of the data from such type into 1 or 0&lt;/P&gt;&lt;P&gt;through fro example: if the obs contains 3 so change it 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what the code or proc to do this task?&lt;/P&gt;&lt;P&gt;of course i m using this way&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   data ceo1;
   set ceo1;
   array change _character_;
           do over change;
            if change=.  then change=0;
            end;
   run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is it correct?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 07:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545148#M74275</guid>
      <dc:creator>Radwan</dc:creator>
      <dc:date>2019-03-22T07:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to change data value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545149#M74276</link>
      <description>&lt;P&gt;So, just to be clear, what does your desired result look like?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 07:39:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545149#M74276</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-22T07:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to change data value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545150#M74277</link>
      <description>&lt;P&gt;Please do ALWAYS supply example data in a readily usable form that leaves NO ambiguities about variable types/lengths/formats and the content.&lt;/P&gt;
&lt;P&gt;Otherwise we'll only be guessing.&lt;/P&gt;
&lt;P&gt;The method to supply such data is a &lt;STRONG&gt;DATA STEP WITH DATALINES&lt;/STRONG&gt;. See this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length variable $10;
input variable;
datalines;
1,3,4
2,8,9
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then, post the expected outcome from this example data. This can be done in a simple tabular way, without SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code does not make sense. You define an array for all &lt;EM&gt;character&lt;/EM&gt; variables, but then you test and set &lt;EM&gt;numeric&lt;/EM&gt; values.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 07:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545150#M74277</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-22T07:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to change data value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545268#M74291</link>
      <description>&lt;P&gt;&amp;nbsp;Please see&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/New-SAS-User/Creating-dummy-variables-from-variables-with-multiple-values/m-p/544619#M7894" target="_blank"&gt;https://communities.sas.com/t5/New-SAS-User/Creating-dummy-variables-from-variables-with-multiple-values/m-p/544619#M7894&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for two examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These assign values of 1 or 0 to array elements where you create an array with one variable for each possible value that occurs.&lt;/P&gt;
&lt;P&gt;Note that these both assume that your values are sequential such as 1,2,3, …,8,9,10 or whatever . Additional logic is needed if you have gaps or non-sequential values.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 15:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-change-data-value/m-p/545268#M74291</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-22T15:53:40Z</dc:date>
    </item>
  </channel>
</rss>

