<?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 Convert mmmYYYY value into something else in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539242#M148548</link>
    <description>&lt;P&gt;Hi, i currently have a script to convert from yymmn6. (201801) to mmmYYYY (jan2018).&lt;/P&gt;&lt;P&gt;However, if it is march, i want it to be converted to mac, instead of mar as default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let period=201808;

data _null_;
	monthyr=input("&amp;amp;period",yymmn6.);
	call symputx('month',lowcase(cats(put(monthyr,worddate3.),year(monthyr))));
run;
%put &amp;amp;=month;

%put &amp;amp;month;

%if %substr(&amp;amp;month,1,3) eq 'mar' %then %do;
	%sysfunc(tranwrd(&amp;amp;month,'mar','mac'))
%end;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had no luck at all. What actually wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Feb 2019 09:22:06 GMT</pubDate>
    <dc:creator>imdickson</dc:creator>
    <dc:date>2019-02-28T09:22:06Z</dc:date>
    <item>
      <title>Convert mmmYYYY value into something else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539242#M148548</link>
      <description>&lt;P&gt;Hi, i currently have a script to convert from yymmn6. (201801) to mmmYYYY (jan2018).&lt;/P&gt;&lt;P&gt;However, if it is march, i want it to be converted to mac, instead of mar as default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let period=201808;

data _null_;
	monthyr=input("&amp;amp;period",yymmn6.);
	call symputx('month',lowcase(cats(put(monthyr,worddate3.),year(monthyr))));
run;
%put &amp;amp;=month;

%put &amp;amp;month;

%if %substr(&amp;amp;month,1,3) eq 'mar' %then %do;
	%sysfunc(tranwrd(&amp;amp;month,'mar','mac'))
%end;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had no luck at all. What actually wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 09:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539242#M148548</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2019-02-28T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert mmmYYYY value into something else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539244#M148549</link>
      <description>&lt;P&gt;Use Base SAS, previously mentioned several times.&lt;/P&gt;
&lt;PRE&gt;%let period=201808;

data _null_;
  monthyr=input("&amp;amp;period",yymmn6.);
  result=lowcase(cats(put(monthyr,worddate3.),year(monthyr)));
  result=tranwrd(result,"mar","mac");
  call symputx('month',result);
run;

%put &amp;amp;month.;

&lt;/PRE&gt;
&lt;P&gt;However, I cannot stress this enough, avoid using such structures in filenames/code.&amp;nbsp; If you need to have date on something use ISO dates - they are sortable, and processable without language issues (i.e. in your case here), do not have upper/lower case issues, and can be partial without issue.&amp;nbsp; This is what mostly everyone else uses, its an international standard for a reason.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 09:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539244#M148549</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-28T09:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Convert mmmYYYY value into something else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539245#M148550</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;. I would definitely adapt to your suggestion. Very much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 10:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-mmmYYYY-value-into-something-else/m-p/539245#M148550</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2019-02-28T10:01:40Z</dc:date>
    </item>
  </channel>
</rss>

