<?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: update  sepcific observation in a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866379#M342127</link>
    <description>&lt;P&gt;This is obviously a made up problem, but changing an invalid value, like the letter P, to a valid value, is a very poor practice. Better you should leave the P as missing, SAS does the correct things when it encounters a missing value. SAS will probably not do the correct things when it finds a 98.&lt;/P&gt;</description>
    <pubDate>Sun, 26 Mar 2023 13:36:18 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-03-26T13:36:18Z</dc:date>
    <item>
      <title>update  sepcific observation in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866325#M342118</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data march;
input id name$ score;
datalines;
1 aaa 55
2 bbb 77
3 ccc 22
4 ddd  p
5 eee  4
6 ff   k
;
run;

/* update values above datasets */

data march;
modify march;
if score=p then score=98;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;hi i want to update value of score where score= p then i want change 98&amp;nbsp; but above update where character value i want only required value to change&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 06:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866325#M342118</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2023-03-26T06:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: update  sepcific observation in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866327#M342119</link>
      <description>&lt;P&gt;Your first DATA step needs fixing. Do that first.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 07:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866327#M342119</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-26T07:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: update  sepcific observation in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866342#M342121</link>
      <description>&lt;P&gt;And your second data step will only work if there is a variable named p in your dataset.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 07:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866342#M342121</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-26T07:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: update  sepcific observation in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866371#M342125</link>
      <description>To get your first DATA step to work, add a MISSING statement:&lt;BR /&gt;&lt;BR /&gt;data march;&lt;BR /&gt;missing p k;&lt;BR /&gt;input id name$ score;&lt;BR /&gt;datalines;&lt;BR /&gt;use the same data you are using now&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;This lets you store p and k as numeric values without needing to change anything to 98.  In fact, changing them to 98 would cause problems later.  For example, when you calculate the average score, values of 98 would affect the average.</description>
      <pubDate>Sun, 26 Mar 2023 11:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866371#M342125</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-03-26T11:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: update  sepcific observation in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866379#M342127</link>
      <description>&lt;P&gt;This is obviously a made up problem, but changing an invalid value, like the letter P, to a valid value, is a very poor practice. Better you should leave the P as missing, SAS does the correct things when it encounters a missing value. SAS will probably not do the correct things when it finds a 98.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 13:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-sepcific-observation-in-a-dataset/m-p/866379#M342127</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-26T13:36:18Z</dc:date>
    </item>
  </channel>
</rss>

