<?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: Need help with a simple macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213666#M39464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simpler method would be to use the already existing metadata which SAS provides in the form of the SASHELP.VTABLE (and VCOLUMN):&lt;/P&gt;&lt;P&gt;%macro mCopy (InLib=,OutLib=);&lt;/P&gt;&lt;P&gt;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.vtable (where=(libname=upcase("&amp;amp;InLib.") and memtype="DATA")); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute('data &amp;amp;outlib..'||strip(memname)||'; set &amp;amp;inlib..'||strip(memname)||'; new_date=today(); format new_date date9.; run;');&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%mend mCopy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mCopy (InLib=sashelp,OutLib=Work);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2015 09:38:59 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-06-26T09:38:59Z</dc:date>
    <item>
      <title>Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213656#M39454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I am trying to change date in all the data sets and saving it on another location &lt;/P&gt;&lt;P&gt;This is what i have written so far &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; datea(data_set,oldst );&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;data &amp;amp;data_set;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;set &amp;amp;oldst;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;new_date=input(old_DATE,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;format new_date &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; datea;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;datea&lt;/EM&gt;&lt;/STRONG&gt;(&amp;amp;var1, &amp;amp;var2 );&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;** I need to change in such a way that I just give library name here it takes all the data set and copies to the second location with the same name &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; var1 = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;%str&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;(abc.dddasas);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; var2 = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;%str&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;(cdf.dddasas);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 07:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213656#M39454</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2015-06-25T07:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213657#M39455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dates are integers.&lt;/P&gt;&lt;P&gt;formats are look-up tables for those integers.&lt;/P&gt;&lt;P&gt;you do not need to create a new variable in order to change the format&lt;/P&gt;&lt;P&gt;i.e. the way the date is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the reference book to have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sas.com/storefront/aux/en/spessguidedatetime/66300_review.html" title="http://www.sas.com/storefront/aux/en/spessguidedatetime/66300_review.html"&gt;The Essential Guide to SAS Dates and Times, Second Edition &lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 12:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213657#M39455</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2015-06-25T12:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213658#M39456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are a few questions that might cover what you are asking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get a list of all data set names within a folder?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get a list of all data sets containing OLD_DATE within a folder?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I apply my macro for every data set name on a list?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I modify my macro to copy a data set from one folder to another?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narrow down the question a little, and you are sure to get answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 13:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213658#M39456</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-25T13:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213659#M39457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi Rahul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If the following is your qurey then find the code followed by the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;You have some datasets in one location and all the datasets have a date variable(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Old_Date&lt;/STRONG&gt; with a particular date format).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Now you want to convert the date variable into date9. format and you want to save the dataset with the same name in another location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;filename Source "Source Path";&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;libname Source "Source Path";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;libname Dest "Destination Path";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%macro dates(Dsn);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data Dest.&amp;amp;Dsn;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set Source.&amp;amp;Dsn;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;new_date=input(old_DATE,dateformat);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;format new_date date9.;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;*Open the directory and find the number of items in the directory;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data _null_;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;did=dopen("source"); &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;dcnt=dnum(did);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;call symput("Count",dcnt);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%Macro datasets;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data datasets;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;did = dopen("Source");&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%do i = 1 %to &amp;amp;Count;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;scan(dread(did,&amp;amp;i),2,'.') eq "sas7bdat" then do;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Checking whether the filename read by dread() is SAS dataset or not;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Dsn = scan(dread(did,&amp;amp;i),1,'.');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Reading the datasetname without extension;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;call execute('%dates('||strip(Dsn)||')');&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;end;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%end;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%mend;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%datasets;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 15:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213659#M39457</guid>
      <dc:creator>MadhuKorni</dc:creator>
      <dc:date>2015-06-25T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213660#M39458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not use Proc Copy?&amp;nbsp; You would just need to assign two libnames and use select or exclude statements to copy the SAS datasets you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 16:17:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213660#M39458</guid>
      <dc:creator>lgregg</dc:creator>
      <dc:date>2015-06-25T16:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213661#M39459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you sir, &lt;/P&gt;&lt;P&gt; Essentially did not mean date date. It could have been a function calculation etc However i wanted to get all the data sets from one library to another library after doing the same calculations on the data sets from the source library and saving it to the destination library&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time into looking through my macro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 02:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213661#M39459</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2015-06-26T02:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213662#M39460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should not be date as such i would like to do essentially same calculations on my source library data sets and save it to another destination.&lt;/P&gt;&lt;P&gt;Thanks for looking through the code and your time &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 02:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213662#M39460</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2015-06-26T02:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213663#M39461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;the problem with proc copy is that i don't want to change anything within my code &lt;/P&gt;&lt;P&gt;also I would have to perform some calculations on source data set and save it to destination library. Which will also require me to keep drop variables, concatenate a few and likewise .&lt;/P&gt;&lt;P&gt;All i am trying to do is create a mac file which the user has to give source and destination library and the user should be done with it &lt;/P&gt;&lt;P&gt;The code i have written actually works however the user has to change data set name every time which i don't want to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 02:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213663#M39461</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2015-06-26T02:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213664#M39462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried it using proc copy too it does work &lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 02:46:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213664#M39462</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2015-06-26T02:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213665#M39463</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;He wants to execute some statements while moving the datasets from one directory to other.&lt;/P&gt;&lt;P&gt;Using proc copy we cannot execute statements other than select and exclude.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 07:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213665#M39463</guid>
      <dc:creator>MadhuKorni</dc:creator>
      <dc:date>2015-06-26T07:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213666#M39464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simpler method would be to use the already existing metadata which SAS provides in the form of the SASHELP.VTABLE (and VCOLUMN):&lt;/P&gt;&lt;P&gt;%macro mCopy (InLib=,OutLib=);&lt;/P&gt;&lt;P&gt;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.vtable (where=(libname=upcase("&amp;amp;InLib.") and memtype="DATA")); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute('data &amp;amp;outlib..'||strip(memname)||'; set &amp;amp;inlib..'||strip(memname)||'; new_date=today(); format new_date date9.; run;');&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%mend mCopy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mCopy (InLib=sashelp,OutLib=Work);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 09:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213666#M39464</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-06-26T09:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a simple macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213667#M39465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jun 2015 13:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-a-simple-macro/m-p/213667#M39465</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2015-06-27T13:10:51Z</dc:date>
    </item>
  </channel>
</rss>

