<?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: Looping table name using date values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622028#M19702</link>
    <description>&lt;P&gt;Loop what date values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Loop where in the code?&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2020 19:58:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-02-03T19:58:42Z</dc:date>
    <item>
      <title>Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622025#M19700</link>
      <description>&lt;P&gt;Hi this is my code&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
   CREATE TABLE WORK.Jul2019 AS 
   SELECT t1.MonthYear, 
          t1.FIN_PROD_GRP_CD, 
          t1.'Ref Code'n AS 'Previous Cycle'n, 
          t3.'Ref Code'n AS 'Current Cycle'n, 
          /* Acct Count */
            (COUNT(t3.'Ref Code'n)) AS 'Acct Count'n
      FROM WORK.ALL_INVENTORY t1
           LEFT JOIN NCDSEEXP.V_COLN_ACC_HIST_DLINQ_BCKT t2 ON (t1.ACC_KEY = t2.ACC_KEY) AND (t1.ACC_KEY_SEQ = 
          t2.ACC_KEY_SEQ)
           LEFT JOIN WORK.'REFERENCE TBL'n t3 ON (t2.ACC_PROD_DLINQ_BCKT_CD = t3.'Dlq Code'n)
      WHERE t1.MonthYear = '31Jul2019'd AND (1882828800) &amp;gt;= t2.ACC_PROD_DLINQ_BCKT_START_DATE AND (1882828800) &amp;lt; 
           t2.ACC_PROD_DLINQ_BCKT_END_DATE
      GROUP BY t1.MonthYear,
               t1.FIN_PROD_GRP_CD,
               t1.'Ref Code'n,
               t3.'Ref Code'n
      ORDER BY t1.'Ref Code'n,
               t3.'Ref Code'n;
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;basically i have my date range from 201711-202001&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i want to loop all the date values in the code. please assist. thank you for your help in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 19:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622025#M19700</guid>
      <dc:creator>PrudhviB</dc:creator>
      <dc:date>2020-02-03T19:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622027#M19701</link>
      <description>&lt;P&gt;Since SQL doesn't actually have any "loop" constructs you might be better off actually showing some small examples of the data that you have and the desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likely join the data and then use a data step to loop over a given values with a DO loop. But without knowing what you are actually attempting to create I'm not going to attempt to provide any code.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 19:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622027#M19701</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-02-03T19:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622028#M19702</link>
      <description>&lt;P&gt;Loop what date values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Loop where in the code?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 19:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622028#M19702</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-03T19:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622033#M19703</link>
      <description>&lt;P&gt;Hi Ballardw,&lt;/P&gt;&lt;P&gt;this is my data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MonthYear (MMYYS7.)&lt;/P&gt;&lt;P&gt;201711&lt;/P&gt;&lt;P&gt;201712&lt;/P&gt;&lt;P&gt;201801&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;202001&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;i want to use the monthYear (ranging from 201711-202001) col from this table to create a table names for each value for example :&lt;/P&gt;&lt;P&gt;all the dates with 201711 will be under NOV_2017 and 201805 will be under MAY_2018&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the date time value is next month end date. for instance in the code i have it for july2019 the date time value is 31st aug 2019 (1882828800).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i want to create tables from 201711 till date (which is 202001, approx 27 tables).&lt;/P&gt;&lt;P&gt;eventually i want the output as shown in the image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image.JPG" style="width: 151px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35838iD2AD638024FC9BA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image.JPG" alt="Image.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 20:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622033#M19703</guid>
      <dc:creator>PrudhviB</dc:creator>
      <dc:date>2020-02-03T20:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622039#M19705</link>
      <description>&lt;P&gt;You would be much better off with a single data set containing all months. This would be far less programming, and also run faster. Why make your life so complicated?? Analyses can be done BY MONTHYEAR and no looping is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
   CREATE TABLE WORK.ALL AS 
   SELECT t1.MonthYear format=yymm5., 
          t1.FIN_PROD_GRP_CD, 
          t1.'Ref Code'n AS 'Previous Cycle'n, 
          t3.'Ref Code'n AS 'Current Cycle'n, 
          /* Acct Count */
            (COUNT(t3.'Ref Code'n)) AS 'Acct Count'n
      FROM WORK.ALL_INVENTORY t1
           LEFT JOIN NCDSEEXP.V_COLN_ACC_HIST_DLINQ_BCKT t2 ON (t1.ACC_KEY = t2.ACC_KEY) AND (t1.ACC_KEY_SEQ = 
          t2.ACC_KEY_SEQ)
           LEFT JOIN WORK.'REFERENCE TBL'n t3 ON (t2.ACC_PROD_DLINQ_BCKT_CD = t3.'Dlq Code'n)
      WHERE t1.MonthYear &amp;gt; '30NOV2017'd AND (1882828800) &amp;gt;= t2.ACC_PROD_DLINQ_BCKT_START_DATE AND (1882828800) &amp;lt; 
           t2.ACC_PROD_DLINQ_BCKT_END_DATE
      GROUP BY t1.MonthYear,
               t1.FIN_PROD_GRP_CD,
               t1.'Ref Code'n,
               t3.'Ref Code'n
      ORDER BY t1.'Ref Code'n,
               t3.'Ref Code'n;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;By the way, it would really be helpful if you explained how your desired month range of 201711 to 202001 relates to your code, as I requested earlier. I have made a guess, but I don't really know if I put the right things in the right places. Please explain this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 20:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622039#M19705</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-03T20:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622081#M19706</link>
      <description>&lt;P&gt;Hey Miller,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes i agree analysis by month makes my life much better. let me&amp;nbsp;give you the gist,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am building my main table to represent roll rates for collections, which will have current cycle and previous cycle for the same accounts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so my logic is break my data into individual months ( which will have monthyear and current cycle values) and join this individual month data back to the bucket tbl (historical data of all delinquencies accounts) to get the previous cycle values ( this is where i use date time value) and then append all the months to get the over all view of roll rates. ( i dont know if there is a better logic i can use to get the previous bucket) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is so hard to provide the actual data let me know if this sample makes sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end data looks like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Month-Year&lt;/TD&gt;&lt;TD&gt;Product Grp&lt;/TD&gt;&lt;TD&gt;Previous Cycle&lt;/TD&gt;&lt;TD&gt;Current Cycle&lt;/TD&gt;&lt;TD&gt;# of accounts&lt;/TD&gt;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&lt;TR&gt;&lt;TD&gt;Jul-19&lt;/TD&gt;&lt;TD&gt;Grp 6&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jul-19&lt;/TD&gt;&lt;TD&gt;Grp 1&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jul-19&lt;/TD&gt;&lt;TD&gt;Grp 2&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 04 Feb 2020 00:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622081#M19706</guid>
      <dc:creator>PrudhviB</dc:creator>
      <dc:date>2020-02-04T00:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622083#M19707</link>
      <description>&lt;P&gt;Couldn't you just join the table with itself using a join condition like&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;l.date=intnx('month',r.date,-1)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 00:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622083#M19707</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-04T00:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622085#M19709</link>
      <description>&lt;P&gt;i tried this but this will not help me as i am trying to get the snapshot (Bucket cycle) of the same account in the previous month.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 01:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622085#M19709</guid>
      <dc:creator>PrudhviB</dc:creator>
      <dc:date>2020-02-04T01:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622094#M19711</link>
      <description>&lt;P&gt;Please try and provide some sample HAVE data, then explain the logic and show us the desired result.&lt;/P&gt;
&lt;P&gt;And please provide the sample data via a working SAS data step so we can spend our time for answering your question and not for preparing the sample data.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 01:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622094#M19711</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-04T01:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Looping table name using date values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622095#M19712</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Couldn't you just join the table with itself using a join condition like&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;l.date=intnx('month',r.date,-1)&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, absolutely, something like this would work and allow one data set to have everything needed that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279632"&gt;@PrudhviB&lt;/a&gt; described. He says this won't work, but doesn't give details or the actual code used, and I'm sure that it would be relatively easy to make this work. But you are correct,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;, we need an example data set in the form of SAS data step code so we can work with this.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Feb 2020 01:57:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Looping-table-name-using-date-values/m-p/622095#M19712</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-04T01:57:53Z</dc:date>
    </item>
  </channel>
</rss>

