<?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 a value based on the value of other variabels in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666084#M199237</link>
    <description>&lt;P&gt;I have a table like this&lt;/P&gt;&lt;P&gt;Ac1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ac2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ac3&amp;nbsp;&amp;nbsp; &amp;nbsp; ZDS&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; osg &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; osh &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; osg &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want from SAS to replace the ZDS value when Ac2 = Cycle&amp;nbsp; and Ac3 is missing at the same time (in this cas at the third line), How to do that what to write in SAS?&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;if Ac2 =&amp;nbsp;Cycle &amp;nbsp; and Ac3 = " " then ZDS = 9.05.04.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;but it didn"t work&lt;/P&gt;&lt;P&gt;Many thanks in advance&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2020 14:12:16 GMT</pubDate>
    <dc:creator>Samero</dc:creator>
    <dc:date>2020-06-30T14:12:16Z</dc:date>
    <item>
      <title>replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666084#M199237</link>
      <description>&lt;P&gt;I have a table like this&lt;/P&gt;&lt;P&gt;Ac1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ac2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ac3&amp;nbsp;&amp;nbsp; &amp;nbsp; ZDS&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; osg &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; osh &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;Stoffwechsel Cycle &amp;nbsp;&amp;nbsp; osg &amp;nbsp; &amp;nbsp;&amp;nbsp; 9.05.02.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want from SAS to replace the ZDS value when Ac2 = Cycle&amp;nbsp; and Ac3 is missing at the same time (in this cas at the third line), How to do that what to write in SAS?&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;if Ac2 =&amp;nbsp;Cycle &amp;nbsp; and Ac3 = " " then ZDS = 9.05.04.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;but it didn"t work&lt;/P&gt;&lt;P&gt;Many thanks in advance&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 14:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666084#M199237</guid>
      <dc:creator>Samero</dc:creator>
      <dc:date>2020-06-30T14:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666088#M199238</link>
      <description>&lt;P&gt;Try :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if Ac2 = 'Cycle'   and missing(Ac3)  then ZDS = "9.05.04.";
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jun 2020 14:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666088#M199238</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-06-30T14:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666098#M199242</link>
      <description>&lt;P&gt;Is ZDS supposed to be a SAS DATE value? (if so really should use a 4 digit year display format)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only way to use a literal date value in SAS is to use the "ddMONyy"d or "ddMONyyyy"d construct.&lt;/P&gt;
&lt;P&gt;So if you want a date that would be 9 May 2002 use "09May2002"d, if you want 5 Sep 2002 use "05Sep2002"d.&lt;/P&gt;
&lt;P&gt;Choice of single or double quotes is yours.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 14:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666098#M199242</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-30T14:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666297#M199330</link>
      <description>no it is not a date it is a key</description>
      <pubDate>Wed, 01 Jul 2020 08:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666297#M199330</guid>
      <dc:creator>Samero</dc:creator>
      <dc:date>2020-07-01T08:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666359#M199361</link>
      <description>&lt;P&gt;Have you tried the code suggested by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223452"&gt;@r_behata&lt;/a&gt; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 12:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666359#M199361</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-07-01T12:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666401#M199375</link>
      <description>wow, that worked super, thank you very much</description>
      <pubDate>Wed, 01 Jul 2020 15:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666401#M199375</guid>
      <dc:creator>Samero</dc:creator>
      <dc:date>2020-07-01T15:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666402#M199376</link>
      <description>yes, it has done the trick</description>
      <pubDate>Wed, 01 Jul 2020 15:06:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666402#M199376</guid>
      <dc:creator>Samero</dc:creator>
      <dc:date>2020-07-01T15:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: replacing a value based on the value of other variabels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666406#M199379</link>
      <description>but what if it is not a missing value and i wanted to change the third value based on the first two values what will be the code in this case? many thanks</description>
      <pubDate>Wed, 01 Jul 2020 15:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-a-value-based-on-the-value-of-other-variabels/m-p/666406#M199379</guid>
      <dc:creator>Samero</dc:creator>
      <dc:date>2020-07-01T15:13:17Z</dc:date>
    </item>
  </channel>
</rss>

