<?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: Creating a Variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610866#M177980</link>
    <description>That isn't valid SAS code, so my question is what did you expect it to do, and how is your data structured?</description>
    <pubDate>Tue, 10 Dec 2019 23:04:21 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-12-10T23:04:21Z</dc:date>
    <item>
      <title>Creating a Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610850#M177966</link>
      <description>&lt;P&gt;I am trying to create a variable (RET2) that will give me the return (variable RET) of the month following the quarterly index (quart_index). I currently have the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data portfolio; set portfolio;
	RET2 = (ret(month(quart_index)) + 1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error that SAS is giving me is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1607  data portfolio; set portfolio;
1608      RET2 = (ret(month(quart_index)) + 1);
                  ---
                  68
ERROR 68-185: The function RET is unknown, or cannot be accessed&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Dec 2019 21:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610850#M177966</guid>
      <dc:creator>spa5263</dc:creator>
      <dc:date>2019-12-10T21:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610855#M177971</link>
      <description>&lt;P&gt;Please show us a portion of your data set.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 22:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610855#M177971</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-10T22:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610865#M177979</link>
      <description>&lt;P&gt;It appears that RET is a variable and you are using it as a function.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 23:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610865#M177979</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2019-12-10T23:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610866#M177980</link>
      <description>That isn't valid SAS code, so my question is what did you expect it to do, and how is your data structured?</description>
      <pubDate>Tue, 10 Dec 2019 23:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610866#M177980</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-10T23:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610868#M177981</link>
      <description>&lt;P&gt;I need the code to create a new column in my result that shows the return of the stock for the month after the quarter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 23:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610868#M177981</guid>
      <dc:creator>spa5263</dc:creator>
      <dc:date>2019-12-10T23:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610869#M177982</link>
      <description>&lt;P&gt;Which depends on the structure of the data. For example, looking up a value within the same row is different than looking for a value in a different row. Therefore without your data structure we cannot help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are instructions on how to provide sample data as a data step:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/297669"&gt;@spa5263&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I need the code to create a new column in my result that shows the return of the stock for the month after the quarter.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 23:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-Variable/m-p/610869#M177982</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-10T23:22:12Z</dc:date>
    </item>
  </channel>
</rss>

