<?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 Formatting a macro for use in file extension (proc import and proc export) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Formatting-a-macro-for-use-in-file-extension-proc-import-and/m-p/691713#M210575</link>
    <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For most of my reports I am able to just use &amp;amp;eom. in my file extensions, but for a project I am working on, I need to be able to import a file based on its file extension of the previous Wednesdays date in DDMMYYN8. format. I have looked through the other questions and found the following, but when I use it, it exports with the SAS date format and not the format I want, and I cant seem to figure out how to format it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;today="&amp;amp;SYSDATE9"d;&lt;BR /&gt;lastwk=intnx('week', today, -1);&lt;BR /&gt;lastwed=intnx('week.4', lastwk , 1);&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 01:27:02 GMT</pubDate>
    <dc:creator>JJ7</dc:creator>
    <dc:date>2020-10-15T01:27:02Z</dc:date>
    <item>
      <title>Formatting a macro for use in file extension (proc import and proc export)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-a-macro-for-use-in-file-extension-proc-import-and/m-p/691713#M210575</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For most of my reports I am able to just use &amp;amp;eom. in my file extensions, but for a project I am working on, I need to be able to import a file based on its file extension of the previous Wednesdays date in DDMMYYN8. format. I have looked through the other questions and found the following, but when I use it, it exports with the SAS date format and not the format I want, and I cant seem to figure out how to format it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;today="&amp;amp;SYSDATE9"d;&lt;BR /&gt;lastwk=intnx('week', today, -1);&lt;BR /&gt;lastwed=intnx('week.4', lastwk , 1);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 01:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-a-macro-for-use-in-file-extension-proc-import-and/m-p/691713#M210575</guid>
      <dc:creator>JJ7</dc:creator>
      <dc:date>2020-10-15T01:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting a macro for use in file extension (proc import and proc export)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-a-macro-for-use-in-file-extension-proc-import-and/m-p/691717#M210577</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;

lastWed = intnx('week', today(), 0, 'b') - 4;

call symputx('lastWed', put(lastWed, ddmmyyn8.));

run;

%put &amp;amp;lastWed.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         data _null_;
 70         
 71         lastWed = intnx('week', today(), 0, 'b') - 4;
 72         
 73         call symputx('lastWed', put(lastWed, ddmmyyn8.));
 74         
 75         run;
 
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              482.90k
       OS Memory           23456.00k
       Timestamp           10/15/2020 02:21:44 AM
       Step Count                        30  Switch Count  0
       Page Faults                       1
       Page Reclaims                     153
       Page Swaps                        0
       Voluntary Context Switches        1
       Involuntary Context Switches      0
       Block Input Operations            344
       Block Output Operations           0
       
 
 76         
 77         %put &amp;amp;lastWed.;
&lt;FONT size="5" color="#FF9900"&gt;&lt;STRONG&gt; 07102020&lt;/STRONG&gt;&lt;/FONT&gt;
 78         
 79         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 89         &lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 02:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-a-macro-for-use-in-file-extension-proc-import-and/m-p/691717#M210577</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-15T02:22:47Z</dc:date>
    </item>
  </channel>
</rss>

