<?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: Using retain an multiply down a collumn in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194499#M36573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thanks. That helped me a lot. &lt;/P&gt;&lt;P&gt;But I have a new question: &lt;/P&gt;&lt;P&gt;What if I instead having b=b*a, but b=1-b*a in the retain function?&lt;/P&gt;&lt;P&gt;If i replaced in the code: &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; want ;&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;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; have ;&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;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; b &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-position: initial;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&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;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; _n_ &amp;gt; &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-position: initial;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; b=1-b*a ;&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;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then it does not work. What do I do? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 18:53:13 GMT</pubDate>
    <dc:creator>CFF</dc:creator>
    <dc:date>2015-08-07T18:53:13Z</dc:date>
    <item>
      <title>Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194494#M36568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have column A and B, where as the first obs in A is set to 0 and the first obs in B is set to 1. &lt;/P&gt;&lt;P&gt;I would like to multiply down column B, using retain to that i multiply A*B, where the column B always will have the result from the retain value*value of column A. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is: &lt;/P&gt;&lt;P&gt;if _n_=1 then A=0 and B=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data check; &lt;/P&gt;&lt;P&gt;set example; &lt;/P&gt;&lt;P&gt;retain b;&lt;/P&gt;&lt;P&gt;b=b*a; &lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that does not seem to work? &lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194494#M36568</guid>
      <dc:creator>CFF</dc:creator>
      <dc:date>2015-08-07T14:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194495#M36569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First describe how it "does not seem to work".&lt;/P&gt;&lt;P&gt;It helps determine what you are trying to do if you can provide some example input data and the desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does your example data set have a variable B? That will cause issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also b=b*a; Would change the value of B for each record.&lt;/P&gt;&lt;P&gt;You likely want something that looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bmult = b*a;&amp;nbsp;&amp;nbsp; Adding a NEW variable to keep the result. But note that if you have B in the example data set you're still likely no to get the results you expect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194495#M36569</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-07T15:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194496#M36570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response! &lt;/P&gt;&lt;P&gt;What I have is 2 variabels A and B. &lt;/P&gt;&lt;P&gt;Variabel A has all its values, but I want to create variabel B through the function retain. I want the first observation to have the value 1.&lt;/P&gt;&lt;P&gt;The rest of the values i want to create as&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; retained value from B and multiply it with the value from A.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Numeric Example: &lt;/P&gt;&lt;P&gt;What I have (I have created numbers that are easy to illustrate my point): &lt;/P&gt;&lt;P&gt;Variabel A:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Variabel B:&lt;/P&gt;&lt;P&gt;0&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;0.5&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;0.5&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;0.5&lt;/P&gt;&lt;P&gt;0.5&lt;/P&gt;&lt;P&gt;What I want then is the retained value to be multiplied with the A Variabel. &lt;/P&gt;&lt;P&gt;Variabel A:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; Variabel B: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;0&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;&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;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;0.5&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5 &lt;/P&gt;&lt;P&gt;0.5&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.25&lt;/P&gt;&lt;P&gt;16&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp; &lt;/P&gt;&lt;P&gt;0,25&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;etc&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Hope this makes sense &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194496#M36570</guid>
      <dc:creator>CFF</dc:creator>
      <dc:date>2015-08-07T15:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194497#M36571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data answer(drop=_b);&lt;/P&gt;&lt;P&gt;set base;&lt;/P&gt;&lt;P&gt;retain b_;&lt;/P&gt;&lt;P&gt;if _n_=1 then do;&lt;/P&gt;&lt;P&gt;b=1;&lt;/P&gt;&lt;P&gt;b_=b;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;else do;&lt;/P&gt;&lt;P&gt;b=a*b_;&lt;/P&gt;&lt;P&gt;b_=b;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 16:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194497#M36571</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2015-08-07T16:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194498#M36572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do NOT want to already have B on the INPUT dataset, otherwise the RETAIN will not work since the retained value will be overwritten when a new record is read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; a @@; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;0 0.5 0.5 16 0.25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; b &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; _n_ &amp;gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; b=b*a ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 17:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194498#M36572</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-07T17:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194499#M36573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thanks. That helped me a lot. &lt;/P&gt;&lt;P&gt;But I have a new question: &lt;/P&gt;&lt;P&gt;What if I instead having b=b*a, but b=1-b*a in the retain function?&lt;/P&gt;&lt;P&gt;If i replaced in the code: &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; want ;&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;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; have ;&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;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; b &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-position: initial;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&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;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; _n_ &amp;gt; &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-position: initial;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; b=1-b*a ;&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;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then it does not work. What do I do? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 18:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194499#M36573</guid>
      <dc:creator>CFF</dc:creator>
      <dc:date>2015-08-07T18:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using retain an multiply down a collumn</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194500#M36574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Likely to be the same issue: B is in the data set HAVE and overwrites any retained value.&lt;/P&gt;&lt;P&gt;Also it is a good idea to describe &lt;STRONG&gt;how&lt;/STRONG&gt; some code does not work: no output at all, error message, unexpected output.&lt;/P&gt;&lt;P&gt;If error message then provide the error message; best is copy code and error from the log. If the output is unexpected provide the actual output and the expected output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 19:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-retain-an-multiply-down-a-collumn/m-p/194500#M36574</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-07T19:37:57Z</dc:date>
    </item>
  </channel>
</rss>

