<?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 How do I Update multiple fields of a record in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-Update-multiple-fields-of-a-record/m-p/833166#M35760</link>
    <description>How do I change the values of age and salary both for Matt?&lt;BR /&gt;Can it be done using if statement?&lt;BR /&gt;data people;&lt;BR /&gt;input name $ age salary;&lt;BR /&gt;datalines;&lt;BR /&gt;Timothy 25 1200&lt;BR /&gt;Mark 30 1500&lt;BR /&gt;Matt 29 1600&lt;BR /&gt;;&lt;BR /&gt;run;</description>
    <pubDate>Tue, 13 Sep 2022 14:47:08 GMT</pubDate>
    <dc:creator>Deb4</dc:creator>
    <dc:date>2022-09-13T14:47:08Z</dc:date>
    <item>
      <title>How do I Update multiple fields of a record</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-Update-multiple-fields-of-a-record/m-p/833166#M35760</link>
      <description>How do I change the values of age and salary both for Matt?&lt;BR /&gt;Can it be done using if statement?&lt;BR /&gt;data people;&lt;BR /&gt;input name $ age salary;&lt;BR /&gt;datalines;&lt;BR /&gt;Timothy 25 1200&lt;BR /&gt;Mark 30 1500&lt;BR /&gt;Matt 29 1600&lt;BR /&gt;;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 13 Sep 2022 14:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-Update-multiple-fields-of-a-record/m-p/833166#M35760</guid>
      <dc:creator>Deb4</dc:creator>
      <dc:date>2022-09-13T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Update multiple fields of a record</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-Update-multiple-fields-of-a-record/m-p/833174#M35761</link>
      <description>&lt;P&gt;How many of these records need to be updated? Is the Name duplicated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you only have a few of these then perhaps an "if" is appropriate: an example with made up values since you did not provide any.&lt;/P&gt;
&lt;P&gt;The key with multiple variables is to place the assignment statements inside a Do/ End block.&lt;/P&gt;
&lt;PRE&gt;data want;
   set people;
   if name='Matt' then do;
      age=45;
      salary= 1850;
   end;
run;&lt;/PRE&gt;
&lt;P&gt;If you have a lot of these and the new values are in a data set you have options but that will depend on whether Name, or any combination of variables used to identify a record, only occurs once or multiple times in the data set.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 15:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-Update-multiple-fields-of-a-record/m-p/833174#M35761</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-09-13T15:27:34Z</dc:date>
    </item>
  </channel>
</rss>

