<?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: How could I write this macro? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128432#M35100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;%&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;name_1&lt;/EM&gt;&lt;/STRONG&gt; (mth=feb, yr=&lt;/SPAN&gt;&lt;STRONG style="font-size: 11pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;2010&lt;/STRONG&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;change into this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;%&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;name_1&lt;/EM&gt;&lt;/STRONG&gt; (feb,&lt;/SPAN&gt;&lt;STRONG style="font-size: 11pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;2010&lt;/STRONG&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;)&amp;nbsp; , and it should work then.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Mar 2013 09:48:20 GMT</pubDate>
    <dc:creator>viollete</dc:creator>
    <dc:date>2013-03-07T09:48:20Z</dc:date>
    <item>
      <title>How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128426#M35094</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 SAS Forum,&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;I have 35 proc sort rounds (commencing Feb_2010 and ending Dec_2012).&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;Three out of those 35 are reproduced below.&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;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=feb_2010_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; bank_number account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&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;/SPAN&gt;&lt;/P&gt;&lt;P&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;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=mar_2010_ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; bank_number account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=apr_2010_ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; bank_number account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Writing 35 times is clumsy. So, I tried a parameter macro like below but it doesn't work.&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&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; name_1 (mth, yr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;proc sort data=&amp;amp;mth_&amp;amp;yr_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;by bank_number account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;run;&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;/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;name_1&lt;/EM&gt;&lt;/STRONG&gt; (mth=feb, yr=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;2010&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;name_1&lt;/EM&gt;&lt;/STRONG&gt; (mth=mar, yr=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;2010&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;name_1&lt;/EM&gt;&lt;/STRONG&gt; (mth=apr, yr=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;2010&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;/P&gt;&lt;P&gt;Could anyone help me to correct the above macro (or sugggest me a method to cut short writing proc sort steps 35 times.&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 05:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128426#M35094</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2013-03-06T05:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128427#M35095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below the updated 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;%macro name_1 (mon);&lt;/P&gt;&lt;P&gt;proc sort data=&amp;amp;mon._;&lt;/P&gt;&lt;P&gt;by bank_number account_number ;&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;%name_1 (FEB_2010);&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;/Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 07:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128427#M35095</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2013-03-06T07:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128428#M35096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find below a macro that will generate the right data set names based on a start and end date, it should help you. It uses the %SYSFUNC function to call DATA Step function for the date calculation as well as for formatting the data set name.&lt;/P&gt;&lt;DIV style="font-family: Consolas; font-size: 14pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; someDate(&lt;BR /&gt;&amp;nbsp; start=&lt;BR /&gt;&amp;nbsp; , end=&lt;BR /&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; start_d = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;("&amp;amp;start"d);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; end_d = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;("&amp;amp;end"d);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; nMonths = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;( intck(MONTH, &amp;amp;start_d, &amp;amp;end_d) );&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; &amp;amp;nMonths;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dsnDate_d = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(intnx(MONTH, &amp;amp;start_d, &amp;amp;i));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dsn = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(putn(&amp;amp;dsnDate_d, MONNAME3.))_&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(putn(&amp;amp;dsnDate_d, YEAR4.));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: i=&amp;amp;i dsn=&amp;amp;dsn;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;%&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #000000; background-color: #ffffff;"&gt;someDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&lt;BR /&gt;&amp;nbsp; start=01feb2010&lt;BR /&gt;&amp;nbsp; , end=01dec2012&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 08:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128428#M35096</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2013-03-06T08:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128429#M35097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Two things: first if you want to use named-style parameters add an = after the name, second: because the underscore is a valid char in variable names, you need to add separating periods.&lt;SPAN style="background: none repeat scroll 0% 0% white; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&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: none repeat scroll 0% 0% white; color: black;"&gt; name_1 (mth&lt;SPAN style="color: #ff0000;"&gt;=&lt;/SPAN&gt;, yr&lt;SPAN style="color: #ff0000;"&gt;=&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background: none repeat scroll 0% 0% white; font-family: courier new,courier;"&gt;proc sort data=&amp;amp;mth&lt;SPAN style="color: #ff0000;"&gt;.&lt;/SPAN&gt;_&amp;amp;yr&lt;SPAN style="color: #ff0000;"&gt;.&lt;/SPAN&gt;_&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;by bank_number account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: navy; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&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;SPAN style="font-family: arial,helvetica,sans-serif; background: none repeat scroll 0% 0% white; color: black; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;You can increase the level of automation (untested code):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do year = 2010 to 2012;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do month = 1 to 12;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&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; text_month = &lt;/SPAN&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;put(&lt;/SPAN&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;mdy(month, 1, year)&lt;/SPAN&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;MONNAME3.)&lt;/SPAN&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&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; dataset = cats(text_month&lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;, '_', year, '_');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&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; if exist(dataset) then do; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&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; call execute(cats('%name_1(mty=', text_month, ', yr=', year, ');'));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&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; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: none repeat scroll 0% 0% white; font-size: 10pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&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;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;run;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 08:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128429#M35097</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2013-03-06T08:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128430#M35098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreas, Daman and Bruno,&lt;/P&gt;&lt;P&gt;Many thanks to each one of you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Bruno,&lt;/P&gt;&lt;P&gt;I am trying to learn your automation code. Before I start googling the meanings of &lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;%sysevalf, &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #0000ff;"&gt;%sysfunc etc., I just ran your code. &lt;/SPAN&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; someDate(&amp;nbsp; start=, end=); &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; start_d = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;("&amp;amp;start"d);&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; end_d = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;("&amp;amp;end"d);&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; nMonths = &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, &amp;amp;start_d, &amp;amp;end_d) );&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;/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;%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: black; font-size: 11pt;"&gt; &amp;amp;nMonths;&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: blue; font-size: 11pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; dsnDate_d = &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, &amp;amp;start_d, &amp;amp;i));&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: blue; font-size: 11pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; dsn = &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;(putn(&amp;amp;dsnDate_d, MONNAME3.))_&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;(putn(&amp;amp;dsnDate_d, YEAR4.));&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: blue; font-size: 11pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; NOTE: i=&amp;amp;i dsn=&amp;amp;dsn;&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;%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;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;/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;someDate&lt;/EM&gt;&lt;/STRONG&gt;(start=01feb2010, end=01dec2012)&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;Could you please let me know what it generates. I could not find the output. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Thank you&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;Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 03:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128430#M35098</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2013-03-07T03:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128431#M35099</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;The macro generates the appropriate string for the data set name you are looking for.&lt;/P&gt;&lt;P&gt;The %SYSEVALF() is used to transform a SAS date constant into a number (internal representation of a date).&lt;/P&gt;&lt;P&gt;The %SYSFUNC() is used to call DATA step functions INTNX() to caluclate the dates needed, which are then formatted using the PUTN(), find below the complete example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; name_1(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;mon&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; proc sort data=&amp;amp;mon._;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by bank_number account_number;&lt;BR /&gt;&amp;nbsp; run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; someDate(&amp;nbsp; start=, end=)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; start_d = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;("&amp;amp;start"d);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; end_d = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;("&amp;amp;end"d);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; nMonths = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;( intck(MONTH, &amp;amp;start_d, &amp;amp;end_d) );&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; &amp;amp;nMonths;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dsnDate_d = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(intnx(MONTH, &amp;amp;start_d, &amp;amp;i));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dsn = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(putn(&amp;amp;dsnDate_d, MONNAME3.))_&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(putn(&amp;amp;dsnDate_d, YEAR4.));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: &amp;amp;sysmacroname Processing dsn=&amp;amp;dsn;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #000000; background-color: #ffffff;"&gt;name_1&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&amp;amp;dsn)&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;%&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #000000; background-color: #ffffff;"&gt;someDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(start=01feb2010, end=01dec2012)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 06:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128431#M35099</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2013-03-07T06:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128432#M35100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;%&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;name_1&lt;/EM&gt;&lt;/STRONG&gt; (mth=feb, yr=&lt;/SPAN&gt;&lt;STRONG style="font-size: 11pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;2010&lt;/STRONG&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;change into this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;%&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;name_1&lt;/EM&gt;&lt;/STRONG&gt; (feb,&lt;/SPAN&gt;&lt;STRONG style="font-size: 11pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;2010&lt;/STRONG&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;)&amp;nbsp; , and it should work then.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 09:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128432#M35100</guid>
      <dc:creator>viollete</dc:creator>
      <dc:date>2013-03-07T09:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128433#M35101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually for positional parameters the user has the choice of whether to use the name or not.&amp;nbsp; If you define the parameters as named (adding the = sign after the parameter name in the macro definition) you are FORCING the user to use the names in the macro call.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 13:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128433#M35101</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-03-07T13:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128434#M35102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If MTH and YR are defined as positional parameter in the macro definition there is no difference in those two macro calls.&amp;nbsp; If either is defined as a named parameter then the second syntax will generate an error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 13:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128434#M35102</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-03-07T13:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: How could I write this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128435#M35103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp; Hi Bruno,&lt;/P&gt;&lt;P&gt;Thank you very much for this description. This is great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;Thank you too for further clarifications on positional parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Viollete,&lt;/P&gt;&lt;P&gt;Than you for your inputs which was further clarified by Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards to all,&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:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-could-I-write-this-macro/m-p/128435#M35103</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2013-03-08T02:25:08Z</dc:date>
    </item>
  </channel>
</rss>

