<?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: How to Calculate this steps in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646615#M193464</link>
    <description>Thanks,&lt;BR /&gt;and sorry there is a missed link in the above question, I edited that now no. 2 point&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 11 May 2020 10:44:17 GMT</pubDate>
    <dc:creator>annypanny</dc:creator>
    <dc:date>2020-05-11T10:44:17Z</dc:date>
    <item>
      <title>How to Calculate this steps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646588#M193460</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;
&lt;P&gt;1.How to calculate the year which is 20 years from run date. E.g if today’s date is 11MAY2020, then this step will give year 2040.&lt;/P&gt;
&lt;P&gt;2. Identify the collection which are linked with the strategies.&lt;/P&gt;
&lt;P&gt;3.How to Calculate production for those collection from the&amp;nbsp;historic production table for which the year value we get in step 1 in the date range in the collection name.&lt;/P&gt;
&lt;P&gt;e.g&amp;nbsp; if collection name is " Flexi 2040-42 (BLK) " then this collection will be picked up and production needs to be calculated for this collection for the corresponding strategy.&lt;/P&gt;
&lt;P&gt;If no such collection&amp;nbsp;is found for any plan, populate 0 in the corresponding months production fields.&lt;/P&gt;
&lt;P&gt;4. perf&amp;nbsp; Field of historic production table&amp;nbsp; will be the production for that collection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example of historic production table,&lt;/P&gt;
&lt;P&gt;Bag&amp;nbsp; &amp;nbsp;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; perf&lt;/P&gt;
&lt;P&gt;BP1&amp;nbsp; 30042015&amp;nbsp; -0.08091&amp;nbsp;&amp;nbsp;&lt;BR /&gt;BP2&amp;nbsp; 31052015&amp;nbsp; 1.14936&amp;nbsp;&amp;nbsp;&lt;BR /&gt;BP2&amp;nbsp; 30062015&amp;nbsp; -5.51757&amp;nbsp;&amp;nbsp;&lt;BR /&gt;BP2&amp;nbsp; 31072015&amp;nbsp; 2.32196&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;example of strategy table&lt;/P&gt;
&lt;P&gt;strategy&amp;nbsp; &amp;nbsp; &amp;nbsp;sc_no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uni_collection&lt;/P&gt;
&lt;P&gt;1895_264&amp;nbsp; A00086&amp;nbsp; X001&lt;BR /&gt;1900_277&amp;nbsp; A00087 X065&lt;BR /&gt;1896_598&amp;nbsp; A00086&amp;nbsp; X474&lt;BR /&gt;2035_629&amp;nbsp; A00100&amp;nbsp; X095&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example of collection table&lt;/P&gt;
&lt;P&gt;uni_collection&amp;nbsp; Collection&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bag&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;612Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Idx (BLK)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BP2&amp;nbsp;&lt;BR /&gt;X474&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cptl 2073-75 (BLK)&amp;nbsp; &amp;nbsp; &amp;nbsp;BY7&amp;nbsp;&lt;BR /&gt;X001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cptl 2040-42 (BLK)&amp;nbsp; &amp;nbsp; BP1&lt;BR /&gt;017R&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cash 2016-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BP1&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;Edited&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 06:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646588#M193460</guid>
      <dc:creator>annypanny</dc:creator>
      <dc:date>2020-05-12T06:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Calculate this steps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646598#M193463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/316738" target="_blank"&gt;@annypanny&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;You can retrieve the year which is 20 years&amp;nbsp;from run date by using the INTNX function.&lt;/DIV&gt;
&lt;DIV&gt;The modifier "S" tells SAS to pick the same date (-&amp;gt; so 11MAY2040).&lt;/DIV&gt;
&lt;DIV&gt;For your other questions, could you please explain where do we find the collection name? For example, is&amp;nbsp;Flexi 2040-42 (BLK) the name of the production dataset?&lt;/DIV&gt;
&lt;DIV&gt;Best,&lt;/DIV&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data have;
	format today_date date9.;
	today_date = today();
	year20 = year(intnx('year',today_date,20,"s"));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 09:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646598#M193463</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-05-11T09:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Calculate this steps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646615#M193464</link>
      <description>Thanks,&lt;BR /&gt;and sorry there is a missed link in the above question, I edited that now no. 2 point&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 May 2020 10:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Calculate-this-steps/m-p/646615#M193464</guid>
      <dc:creator>annypanny</dc:creator>
      <dc:date>2020-05-11T10:44:17Z</dc:date>
    </item>
  </channel>
</rss>

