<?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 Replacing observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178425#M264932</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii...&lt;/P&gt;&lt;P&gt;Can anyone tell me how to replace the observations of a particular variable in a data set.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Feb 2015 06:48:15 GMT</pubDate>
    <dc:creator>PreethamReddy</dc:creator>
    <dc:date>2015-02-22T06:48:15Z</dc:date>
    <item>
      <title>Replacing observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178425#M264932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii...&lt;/P&gt;&lt;P&gt;Can anyone tell me how to replace the observations of a particular variable in a data set.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2015 06:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178425#M264932</guid>
      <dc:creator>PreethamReddy</dc:creator>
      <dc:date>2015-02-22T06:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178426#M264933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think&amp;nbsp; merge / update&amp;nbsp; will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2015 13:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178426#M264933</guid>
      <dc:creator>Vish33</dc:creator>
      <dc:date>2015-02-22T13:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178427#M264934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or if you can provide sample data and output (how you want) , that could be helpful in answering your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2015 13:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178427#M264934</guid>
      <dc:creator>Vish33</dc:creator>
      <dc:date>2015-02-22T13:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178428#M264935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vish,&lt;/P&gt;&lt;P&gt;The question is "Create a new data and transform the values of 5 variables(weight, calories, Protein, fat, Satfat). Variables containing Value = 11 will be replaced by the Value of 3 ."&lt;/P&gt;&lt;P&gt;The solution I had tried is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data bittu.junkfood123;&lt;/P&gt;&lt;P&gt;set&amp;nbsp; bittu.junkfood;&lt;/P&gt;&lt;P&gt;WEIGHT = 3;&lt;/P&gt;&lt;P&gt;replace all var {WEIGHT} where (WEIGHT==11);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image-thumbnail jive-image" height="323" src="https://communities.sas.com/legacyfs/online/9253_Untitled.png" style="width: 574px; height: 322.715555555556px;" width="574" /&gt;&lt;/P&gt;&lt;P&gt;Iam getting error when I execute my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 01:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178428#M264935</guid>
      <dc:creator>PreethamReddy</dc:creator>
      <dc:date>2015-02-23T01:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178429#M264936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello vish,&lt;/P&gt;&lt;P&gt;The Problem that I had is "Create a new data and transform the values of 5 variables(weight, calories, Protein, fat, Satfat). Variables containing Value = 11 will be replaced by the Value of 3 ."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code that I tried is&lt;/P&gt;&lt;P&gt;data bittu.junkfood123;&lt;/P&gt;&lt;P&gt;set&amp;nbsp; bittu.junkfood;&lt;/P&gt;&lt;P&gt;WEIGHT = 3;&lt;/P&gt;&lt;P&gt;replace all var {WEIGHT} where (WEIGHT==11);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I am getting error when I execute this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image-thumbnail jive-image" height="332" src="https://communities.sas.com/legacyfs/online/9254_Untitled.png" style="width: 591px; height: 332.273333333333px;" width="591" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 01:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178429#M264936</guid>
      <dc:creator>PreethamReddy</dc:creator>
      <dc:date>2015-02-23T01:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178430#M264937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will do something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data bittu.junkfood123;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set&amp;nbsp; bittu.junkfood;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;IF WEIGHT = 11 THEN WEIGHT=3;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Also if you want to do the same for this 5 variables you could use an array&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data bittu.junkfood123;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set&amp;nbsp; bittu.junkfood;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em; background-color: transparent;"&gt;array vars{*} &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;weight&amp;nbsp; calories&amp;nbsp; Protein fat Satfat;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="line-height: 1.5em; font-size: 13px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;do over vars;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if vars=11 then vars=3;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;end;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 11:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-observations/m-p/178430#M264937</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2015-02-25T11:06:07Z</dc:date>
    </item>
  </channel>
</rss>

