<?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 How could I cut short these 35 repeated statements? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128363#M35070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAS Forum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;I have repeated the below "set" statements 35 times, corresponding to Feb 2010 to .......Dec2012.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;I have already done the job but this code is highly inefficint. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Could you please help me to macronize these 35 repeated rounds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data feb_2010_(rename=(balance=FEB2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set FEB_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data mar_2010_(rename=(&amp;nbsp; balance=mar2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set mar_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data apr_2010_(rename=( balance=apr2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set apr_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data may_2010_(rename=( balance=may2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set may_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data jun_2010_(rename=( balance=jun2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set jun_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data JUL_2010_(rename=( balance=JUL2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set JUL_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Aug_2010_(rename=( balance=Aug2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Aug_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Sep_2010_(rename=( balance=Sep2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Sep_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Oct_2010_(rename=( balance=Oct2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Oct_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Nov_2010_(rename=( balance=Nov2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Nov_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Dec_2010_(rename=( balance=Dec2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Dec_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Jan_2011_(rename=( balance=Jan2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jan_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data FEB_2011_(rename=( balance=Feb2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set FEB_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Mar_2011_(rename=( balance=Mar2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Mar_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Apr_2011_(rename=( balance=Apr2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Apr_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data May_2011_(rename=( balance=May2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set May_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Jun_2011_(rename=( balance=Jun2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jun_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Jul_2011_(rename=( balance=Jul2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jul_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Aug_2011_(rename=( balance=Aug2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Aug_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Sep_2011_(rename=( balance=Sep2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Sep_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Oct_2011_(rename=( balance=Oct2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Oct_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Nov_2011_(rename=( balance=Nov2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Nov_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Dec_2011_(rename=( balance=Dec2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Dec_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Jan_2012_(rename=( balance=Jan2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jan_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Feb_2012_(rename=( balance=Feb2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Feb_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Mar_2012_(rename=( balance=Mar2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Mar_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Apr_2012_(rename=( balance=Apr2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Apr_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data May_2012_(rename=( balance=May2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set May_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Jun_2012_(rename=( balance=Jun2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jun_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Jul_2012_(rename=( balance=Jul2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jul_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Aug_2012_(rename=( balance=Aug2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Aug_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Sep_2012_(rename=( balance=Sep2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Sep_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Oct_2012_(rename=( balance=Oct2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Oct_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Nov_2012_(rename=( balance=Nov2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Nov_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Dec_2012_(rename=( balance=Dec2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Dec_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Mar 2013 06:13:04 GMT</pubDate>
    <dc:creator>Mirisage</dc:creator>
    <dc:date>2013-03-06T06:13:04Z</dc:date>
    <item>
      <title>How could I cut short these 35 repeated statements?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128363#M35070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAS Forum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;I have repeated the below "set" statements 35 times, corresponding to Feb 2010 to .......Dec2012.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;I have already done the job but this code is highly inefficint. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Could you please help me to macronize these 35 repeated rounds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data feb_2010_(rename=(balance=FEB2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set FEB_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data mar_2010_(rename=(&amp;nbsp; balance=mar2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set mar_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data apr_2010_(rename=( balance=apr2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set apr_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data may_2010_(rename=( balance=may2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set may_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data jun_2010_(rename=( balance=jun2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set jun_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data JUL_2010_(rename=( balance=JUL2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set JUL_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Aug_2010_(rename=( balance=Aug2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Aug_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Sep_2010_(rename=( balance=Sep2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Sep_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Oct_2010_(rename=( balance=Oct2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Oct_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Nov_2010_(rename=( balance=Nov2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Nov_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Dec_2010_(rename=( balance=Dec2010_balance))&lt;BR /&gt;;&lt;BR /&gt;set Dec_2010 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Jan_2011_(rename=( balance=Jan2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jan_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data FEB_2011_(rename=( balance=Feb2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set FEB_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Mar_2011_(rename=( balance=Mar2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Mar_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Apr_2011_(rename=( balance=Apr2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Apr_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data May_2011_(rename=( balance=May2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set May_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Jun_2011_(rename=( balance=Jun2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jun_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Jul_2011_(rename=( balance=Jul2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jul_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Aug_2011_(rename=( balance=Aug2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Aug_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Sep_2011_(rename=( balance=Sep2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Sep_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Oct_2011_(rename=( balance=Oct2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Oct_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Nov_2011_(rename=( balance=Nov2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Nov_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Dec_2011_(rename=( balance=Dec2011_balance))&lt;BR /&gt;;&lt;BR /&gt;set Dec_2011 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Jan_2012_(rename=( balance=Jan2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jan_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Feb_2012_(rename=( balance=Feb2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Feb_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Mar_2012_(rename=( balance=Mar2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Mar_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data Apr_2012_(rename=( balance=Apr2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Apr_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data May_2012_(rename=( balance=May2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set May_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Jun_2012_(rename=( balance=Jun2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jun_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Jul_2012_(rename=( balance=Jul2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Jul_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Aug_2012_(rename=( balance=Aug2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Aug_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Sep_2012_(rename=( balance=Sep2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Sep_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Oct_2012_(rename=( balance=Oct2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Oct_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Nov_2012_(rename=( balance=Nov2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Nov_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data Dec_2012_(rename=( balance=Dec2012_balance))&lt;BR /&gt;;&lt;BR /&gt;set Dec_2012 (keep= bank_number account_number&amp;nbsp;&amp;nbsp; balance);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 06:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128363#M35070</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2013-03-06T06:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: How could I cut short these 35 repeated statements?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128364#M35071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mirisage,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below the macro for your code:-&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; FEB_2010;&lt;/P&gt;&lt;P&gt;input bank_number account_number balance;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;123 1313 232131&lt;/P&gt;&lt;P&gt;322 2321 231232&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro mnth(mon);&lt;/P&gt;&lt;P&gt;data &amp;amp;mon._ (rename=(balance=&amp;amp;mon._balance));&lt;/P&gt;&lt;P&gt;set &amp;amp;mon. (keep= bank_number account_number balance);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=&amp;amp;mon._;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mnth(FEB_2010);- This you can repeat with any month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=============================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output:-&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;&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;&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; bank_&amp;nbsp;&amp;nbsp;&amp;nbsp; account_&amp;nbsp;&amp;nbsp;&amp;nbsp; FEB_2010_&lt;/P&gt;&lt;P&gt;&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;&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; Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; balance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&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&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1313&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 232131 &lt;/P&gt;&lt;P&gt;&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;&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; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 322&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2321&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 231232 &lt;/P&gt;&lt;P&gt;=========================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 07:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128364#M35071</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2013-03-06T07:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How could I cut short these 35 repeated statements?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128365#M35072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you could write the macro to take a start and end value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%macro mnth(start,end);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%local i mon ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%do i=0 %to &lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;%sysfunc(intck(month,"01&amp;amp;start"d,"01&amp;amp;end"d)) ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %let mon=%sysfunc(intnx(month,"01&amp;amp;start"d,&amp;amp;i),monyy7.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; data &amp;amp;mon._ (rename=(balance=&amp;amp;mon._balance));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &amp;amp;mon. (keep= bank_number account_number balance);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 15:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128365#M35072</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-03-06T15:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: How could I cut short these 35 repeated statements?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128366#M35073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Hi Daman and Tom,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Many thanks to both of you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Hi Tom,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;I like to learn your automation code. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;So, I ran your code in SAS editor. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; mnth(start,end);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; i mon ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%to&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;(intck(month,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;"01&amp;amp;start"d&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;"01&amp;amp;end"d&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;)) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; mon=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;(intnx(month,"01&amp;amp;start"d,&amp;amp;i),monyy7.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="FR" style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;data &amp;amp;mon._ (rename=(balance=&amp;amp;mon._balance));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;set &amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;mon.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; (keep= bank_number account_number balance);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;%&lt;STRONG&gt;&lt;EM&gt;mnth&lt;/EM&gt;&lt;/STRONG&gt; (start=Feb2010, end=Dec2012);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;It gives a complain like this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %mnth (start=Feb2010, end=Dec2012);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable START resolves to Feb2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable END resolves to Dec2012&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable START resolves to Feb2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable I resolves to 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable MON resolves to FEB2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable MON resolves to FEB2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable MON resolves to FEB2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 11pt;"&gt;ERROR: File WORK.FEB2010.DATA does not exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;Could you please let me know how to fix this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;Thanks Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 03:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128366#M35073</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2013-03-07T03:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How could I cut short these 35 repeated statements?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128367#M35074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The macro is generating the macro variable MON in format of MMMYYYY.&amp;nbsp; Your original naming convention in the code you posted had extra underscores in the dataset names.&amp;nbsp; Personally I would remove the extra underscores from the dataset names, but you might not have that option. Also I am not sure why you are creating so many individual datasets anyway.&amp;nbsp; Why not just make one dataset with a MONTH or DATE column to distinguish the groupings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can fix it in a number of ways. Here is one. Parse the month and the year part of the current date into separated macro variables and then you can stick in the extra underscores where you need them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: navy;"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt; mnth(start,end);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt; i mon year;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt; i=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: teal;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%to&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;(intck(month,&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: teal;"&gt;&lt;STRONG&gt;"01&amp;amp;start"d&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: teal;"&gt;&lt;STRONG&gt;"01&amp;amp;end"d&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;)) ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt; mon=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;(intnx(month,"01&amp;amp;start"d,&amp;amp;i),monyy7.);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; font-family: 'courier new', courier; color: black;"&gt;&amp;nbsp; %let year=%substr(&amp;amp;mon,4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; font-family: 'courier new', courier; color: black;"&gt;&amp;nbsp; %let mon =%substr(&amp;amp;mon,1,3);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN lang="FR" style="font-style: inherit; font-size: 11pt; font-family: 'courier new', courier; color: black;"&gt;&amp;nbsp; data &amp;amp;mon._&amp;amp;year._ (rename=(balance=&amp;amp;mon.&amp;amp;year._balance));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;set &amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: teal;"&gt;mon._&amp;amp;year&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt; (keep= bank_number account_number balance);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; font-family: 'courier new', courier; color: black;"&gt;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: blue;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: navy;"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 11pt; color: black;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 04:00:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128367#M35074</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-03-07T04:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: How could I cut short these 35 repeated statements?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128368#M35075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for these insights and your clues. These are extremely helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 02:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-cut-short-these-35-repeated-statements/m-p/128368#M35075</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2013-03-08T02:37:11Z</dc:date>
    </item>
  </channel>
</rss>

