<?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: Macro to get MonYY in title case in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783446#M249798</link>
    <description>&lt;P&gt;Thanks, it worked. Just that the code you shared had too many brackets, but removing them got me the required result. Appreciate the help, thanks again !&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 18:56:12 GMT</pubDate>
    <dc:creator>somepathak</dc:creator>
    <dc:date>2021-12-01T18:56:12Z</dc:date>
    <item>
      <title>Macro to get MonYY in title case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783441#M249795</link>
      <description>&lt;P&gt;The following macro returns date in monYY format. The output is having the month name in all caps e.g.&amp;nbsp;&lt;SPAN&gt;DEC19 while the desired output is Dec19. What changes should be made to the macro to get the output in the required format.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance !&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;%macro iter();
data _null_;

%do i = 1 %to 12;
%global monthy&amp;amp;i.;
call symput("monthy&amp;amp;i.",put(intnx('month',&amp;amp;dt.,(-&amp;amp;i.)+1,'e'),monyy5.)));
%end;&lt;BR /&gt;
run;

%mend;
%iter();&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 18:47:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783441#M249795</guid>
      <dc:creator>somepathak</dc:creator>
      <dc:date>2021-12-01T18:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to get MonYY in title case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783443#M249796</link>
      <description>You could just nest it with PROPCASE?&lt;BR /&gt;&lt;BR /&gt;%macro iter();&lt;BR /&gt;data _null_;&lt;BR /&gt;&lt;BR /&gt;%do i = 1 %to 12;&lt;BR /&gt;%global monthy&amp;amp;i.;&lt;BR /&gt;call symput("monthy&amp;amp;i.", propcase(put(intnx('month',&amp;amp;dt.,(-&amp;amp;i.)+1,'e'),monyy5.))));&lt;BR /&gt;%end;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%mend;&lt;BR /&gt;%iter();</description>
      <pubDate>Wed, 01 Dec 2021 18:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783443#M249796</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-01T18:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to get MonYY in title case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783446#M249798</link>
      <description>&lt;P&gt;Thanks, it worked. Just that the code you shared had too many brackets, but removing them got me the required result. Appreciate the help, thanks again !&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 18:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783446#M249798</guid>
      <dc:creator>somepathak</dc:creator>
      <dc:date>2021-12-01T18:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to get MonYY in title case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783453#M249803</link>
      <description>&lt;P&gt;Why did you code a %DO loop in a data step?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  do i=1 to 12;
    call symputx(cats('monthy',1)
                ,propcase( put( intnx('month',&amp;amp;dt.,1-i,'e') ,monyy5.) )
                ,'g');
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also why are you using only 2 digits for the year?&amp;nbsp; Use MONYY7 to get full four digits of the year.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 19:39:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-to-get-MonYY-in-title-case/m-p/783453#M249803</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-01T19:39:11Z</dc:date>
    </item>
  </channel>
</rss>

