<?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 using proc contents variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183251#M14068</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;i am using below code and once i got "work.date" after end of the proc contents step, i want to use "create date" and "last modified date" variable in %macro step for multiple if statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please tell me how i can use those two variable in next %macro step?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;filename filelist pipe 'dir "f\shares\jim\finance\*.mdb" /b';&lt;/P&gt;&lt;P&gt;data work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile filelist truncover lrecl=256;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input filename $256.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; name=scan(filename,1,'_');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data=work.use_date out=work.date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*i want to use&amp;nbsp; "create date" and "last modified date" from work.date here */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro xyz;&lt;/P&gt;&lt;P&gt;%if create_date=today() %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data....&lt;/P&gt;&lt;P&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; .....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%xyz;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Apr 2014 00:16:41 GMT</pubDate>
    <dc:creator>jimksas</dc:creator>
    <dc:date>2014-04-17T00:16:41Z</dc:date>
    <item>
      <title>using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183251#M14068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;i am using below code and once i got "work.date" after end of the proc contents step, i want to use "create date" and "last modified date" variable in %macro step for multiple if statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please tell me how i can use those two variable in next %macro step?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;filename filelist pipe 'dir "f\shares\jim\finance\*.mdb" /b';&lt;/P&gt;&lt;P&gt;data work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile filelist truncover lrecl=256;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input filename $256.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; name=scan(filename,1,'_');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data=work.use_date out=work.date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*i want to use&amp;nbsp; "create date" and "last modified date" from work.date here */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro xyz;&lt;/P&gt;&lt;P&gt;%if create_date=today() %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data....&lt;/P&gt;&lt;P&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; .....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data....&lt;/P&gt;&lt;P&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; ....&lt;/P&gt;&lt;P&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;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%xyz;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 00:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183251#M14068</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-17T00:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183252#M14069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure that your code is meeting your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; "create date" and "last modified date" variables in "work.date" are the date that work.use_date are created, which is the date that you are running the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you trying to do with this code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 01:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183252#M14069</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-04-17T01:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183253#M14070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use those two variable like this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H5&gt;%macro check_new_date;&lt;/H5&gt;&lt;P&gt;%if datepart(create_date) = today() %&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&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; abort return;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%else %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=check1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=check2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge check1 (in=a) check2 (in=b)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if a=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and more data setps;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%end;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%check_new_date;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 02:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183253#M14070</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-17T02:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183254#M14071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Maybe this will help you:&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select distinct datepart(crdate), datepart(modate) into :create_date, :modf_date from work.date;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;%macro check_new_date;&lt;BR /&gt;%if&amp;nbsp; &amp;amp;create_date = %sysfunc(today()) %then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do;&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 06:18:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183254#M14071</guid>
      <dc:creator>SKK</dc:creator>
      <dc:date>2014-04-17T06:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183255#M14072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid that TomKari is correct here.&amp;nbsp; Your logic doesn't make sense as is.&amp;nbsp; The date created and date modified will be the date time that this part of the code is run:&lt;/P&gt;&lt;P&gt;filename filelist pipe 'dir "f\shares\jim\finance\*.mdb" /b';&lt;/P&gt;&lt;P&gt;data work.use_date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now what I think you want is the date time of the file as it is from the operating system.&amp;nbsp; I.e. if I create a file in Windows on the 13MAR2013, then I run your code on the 26JAN2014, the creation date would be 26JAN2014, whereas what you want to know is 13MAR2013.&amp;nbsp; To do this you need to modify how you get the directory listing.&amp;nbsp; Doing the below gets the directory listing, then post processes the info to get creation date time, size and filename.&amp;nbsp; These can then be symputted into macro variables or otherwise processed.&amp;nbsp; Note the /tc in the pipe, this means the date/time is the creation date/time.&amp;nbsp; If you want accessed then /ta, for last written use /tw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename mypipe pipe 'dir "s:\temp\rob" /tc';&lt;/P&gt;&lt;P&gt;data use_date;&lt;BR /&gt;&amp;nbsp; attrib&amp;nbsp; buffer format=$2000.&lt;BR /&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; file_last_written_date format=date9.&lt;BR /&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; file_last_written_time format=time5.&lt;BR /&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; file_size format=best.&lt;BR /&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; file_name format=$200.;&lt;BR /&gt;&amp;nbsp; infile mypipe;&lt;BR /&gt;&amp;nbsp; input buffer $2000.;&lt;BR /&gt;&amp;nbsp; if substr(buffer,1,5) in ("Volum","Direc") or index(buffer,"&amp;lt;DIR&amp;gt;")&amp;gt;0 or index(buffer,"Dir(s)")&amp;gt;0 then delete;&amp;nbsp; /* Remove some extra info */&lt;BR /&gt;&amp;nbsp; file_last_written_date=input(put(scan(compbl(buffer),1,' '),$10.),ddmmyy10.);&amp;nbsp; /* note dependant on system settings */&lt;BR /&gt;&amp;nbsp; file_last_written_time=input(put(scan(compbl(buffer),2,' '),$5.),time5.);&lt;BR /&gt;&amp;nbsp; file_size=scan(compbl(buffer),3,' ');&lt;BR /&gt;&amp;nbsp; file_name=scan(compbl(buffer),4,' ');&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183255#M14072</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-17T09:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183256#M14073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does Proc contents have to do with this question?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 15:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183256#M14073</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-04-17T15:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183257#M14074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ballardw - goal is to use "create date" and or "last modified date" from "proc contents" for further "if then else" condition....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 16:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183257#M14074</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-17T16:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183258#M14075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry - I am trying to get "created date" for .mdb files exist on that folder "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;"f\shares\jim\finance\*.mdb"&lt;/SPAN&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then based on that (created date) - my next logic will be...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i get it...please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 18:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183258#M14075</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-17T18:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183259#M14076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see about 4 things that need to be done.&amp;nbsp; I do something similar where I use Proc Contents to check a variable list of incoming Access files, to look for specific tables, and then load data from those tables.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Get Create_date from Proc Contents on the Access data file&lt;/P&gt;&lt;P&gt;2. You need to add parameters to your Macro for the filename and the creation date to pass into the Macro&lt;/P&gt;&lt;P&gt;3. Because your macro is doing full DATA steps, you can't call the macro from inside a DATA step.&amp;nbsp; You need to have what I call a "driver" macro, to loop through the list of files.&lt;/P&gt;&lt;P&gt;4. In preparation for the driver macro, I use CALL SYMPUT to write each filename to a macro variable with a counter for the suffix, and loop through those in the driver macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have program code, but I would need to first edit it heavily.&amp;nbsp; I have been swamped this morning, so I have not yet done that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 19:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183259#M14076</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2014-04-17T19:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183260#M14077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks CWILSON - i am using "proc contents" to get date information, and SK K solutions for macro variable (you are saying call symput)...i think it will work...but if you share code with your logic - would be grt...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 19:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183260#M14077</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-17T19:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183261#M14078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a couple things that are not clear to me:&lt;/P&gt;&lt;P&gt;1. When you get your file list, I assume you are expecting multiple files, right?&lt;/P&gt;&lt;P&gt;2. I don't understand why you scan up to the first "_" when parsing the file name, because to process the file, you will want the full file name.&lt;/P&gt;&lt;P&gt;3. In your second post, you indicate that if the file being processed was created today, then you want to abort return?&amp;nbsp; Does that mean you want to stop all processing?&amp;nbsp; Or you just don't want to process that particular file? (I normally would expect to move on to the next file, so I would change the %if logic slightly.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caveats:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I have not tested this code.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; I have never tried to get the create date for an Access file using the output from the Proc Contents.&amp;nbsp; In order to get the list of tables inside the Access file, I had to use ODS trace on and ODS output statemtns, which I have excluded from the code below, in the hopes that the Proc Contents output gives you what you want.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; If nothing else, this should move you forward to what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Starting with your code:&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;filename filelist pipe 'dir "f:\shares\jim\finance\*.mdb" /b';&lt;/P&gt;&lt;P&gt;data work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile filelist truncover lrecl=256;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input filename $256.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; name=scan(filename,1,'_'); &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;/* this step won't give you what you want...&lt;/P&gt;&lt;P&gt;proc contents data=work.use_date out=work.date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;* read set of filenames that are now sorted and generate macro variables ;&lt;/P&gt;&lt;P&gt;data work.use_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set work.use_date end=EOF ;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; CALL SYMPUT('file' || trim(left(_n_)), trim(filename) ) ;&amp;nbsp;&amp;nbsp; ** correction ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if EOF then CALL SYMPUT('filecount', _n_) ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;* this will give you macros file1, file2, etc. ;&lt;/P&gt;&lt;P&gt;%put file count = &amp;amp;filecount ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;** NEW: Driver macro that will loop through list of files ;&lt;/P&gt;&lt;P&gt;%macro LoopFiles ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if &amp;amp;filecount &amp;gt; 0 %then %do ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i = 1 %to &amp;amp;filecount ;&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; ** correction ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %check_new_date(&amp;amp;&amp;amp;file&amp;amp;i);&amp;nbsp; *notice recursive macro syntax - resolve &amp;amp;i then resolve &amp;amp;file1, etc..;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end ;&lt;/P&gt;&lt;P&gt;%mend LoopFiles ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;** add file parameter to your macro ;&lt;/P&gt;&lt;P&gt;%macro check_new_date(thisfile);&lt;/P&gt;&lt;P&gt;&amp;nbsp; * check the date of the Access datafile inside your macro (combination of SKK and my Access file code) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;%LET accfile1="f\shares\jim\finance\&amp;amp;thisfile" ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LIBNAME thisacc ="f:\shares\jim\finance\&amp;amp;thisfile";&amp;nbsp;&amp;nbsp;&amp;nbsp; ** correction ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc contents data=thisacc._all_ out=work.date;&amp;nbsp; ** or replace _all_ with a specific table name, if you know what it is ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;** check values in work.date ;&lt;/P&gt;&lt;P&gt;proc print data = work.date ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var libname memname crdate modate ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct datepart(crdate) into :create_date from work.date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;%PUT Create_date for &amp;amp;thisfile = &amp;amp;create_date ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if &amp;amp;create_date = %sysfunc(today()) %then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&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; abort return;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=check1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=check2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge check1 (in=a) check2 (in=b)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if a=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and more data setps;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%mend check_new_date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;** call driver macro ;&lt;/P&gt;&lt;P&gt;%LoopFiles;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Carla Wilson&#xD;
A few corrections to my program code, flagged with ** correction ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 15:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183261#M14078</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2014-04-19T15:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183262#M14079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am thinking to use this rather...almost similar i guess...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;options mprint mlogic symbolgen;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;filename filelist pipe&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; 'dir "f\shares\jim\finance\*.mdb" /b';&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data work.use_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; infile filelist truncover lrecl=256;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; input filename $256.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; name=scan (filename,1,'_');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=work.date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; by name;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc contents data=work.use_date out=work.chk_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select distinct datepart(crdate), datepart(modate) into :create_date, :modf_date&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from work.chk_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%put &amp;amp;create_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%put &amp;amp;modf_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; %if&amp;nbsp; &amp;amp;create_date = %sysfunc(today()) %then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 23:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183262#M14079</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-22T23:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183263#M14080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;even after all trials i am not getting what i want...I agree with TomKari's statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;"The&amp;nbsp; "create date" and "last modified date" variables in "work.date" are the date that work.use_date are created, which is the date that you are running the project.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No i don't know how i will get that...created date on existing file...(let's say that it's not today or day when i want to run code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help...!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 20:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183263#M14080</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-23T20:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183264#M14081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I also indicated in the code I posted that the proc contents on work.use_date was not going to work.&lt;/P&gt;&lt;P&gt;I did have some questions for you at the top of my post.&amp;nbsp; Please reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, I don't believe you can use %if macro code in open SAS code.&amp;nbsp; I think it needs to be in a defined macro.&amp;nbsp; (but I could be wrong.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have to set up a test to test the ability to read the create_date from an Access file, and this will have to be after-hours.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 20:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183264#M14081</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2014-04-23T20:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183265#M14082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am embedding everything under macro only, so let's say we can go with this i guess...big question for me is, &lt;EM&gt;&lt;STRONG&gt;how to use "create_date" variable&lt;/STRONG&gt;&lt;/EM&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;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;%macro jimk;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;options mprint mlogic symbolgen;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;filename filelist pipe&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; 'dir "f\shares\jim\finance\*.mdb" /b';&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;data work.use_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; infile filelist truncover lrecl=256;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; input filename $256.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; name=scan (filename,1,'_');&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;proc sort data=work.date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; by name;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;proc contents data=work.use_date out=work.chk_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;select distinct datepart(crdate), datepart(modate) into :create_date, :modf_date &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;from work.chk_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;%put &amp;amp;create_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;%put &amp;amp;modf_date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; %if&amp;nbsp; &amp;amp;create_date = %sysfunc(today()) %then&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;%mend;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;jimk;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;%jimk;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 20:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183265#M14082</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-23T20:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183266#M14083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I set up a test folder with some test Access datafiles and executed my program.&amp;nbsp; I found a couple mistakes in my code, which I corrected in my post above.&amp;nbsp; The program "worked" to a point.&amp;nbsp; It did loop throught the files very nicely, but the creation date was always missing.&amp;nbsp; I put a Proc Print after the Proc Contents step, and it turns out that crdate and modate, although available in the Proc contents output, are always missing.&amp;nbsp; Here is an example of the results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;&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;&amp;nbsp;&amp;nbsp; The SAS System&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18:58 Wednesday, April 23, 2014&amp;nbsp; 58&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; LIBNAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEMNAME&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; CRDATE&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; MODATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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; 26&amp;nbsp;&amp;nbsp;&amp;nbsp; THISACC&amp;nbsp;&amp;nbsp;&amp;nbsp; Failure List&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;&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; .&lt;/P&gt;&lt;P&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; 27&amp;nbsp;&amp;nbsp;&amp;nbsp; THISACC&amp;nbsp;&amp;nbsp;&amp;nbsp; Graph Examples&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;&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; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, unfortunately, it looks like perhaps Proc Contents is not able to determine the crdate for an Access file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I tried the code posted by RW9.&amp;nbsp; I did have to tweak it a bit to successfully read my piped dir data (varies with system settings).&amp;nbsp; I also found I needed to use the option /tw, instead of /tc to get the dates I wanted.&amp;nbsp; /tc gave me the date that I copied the files into my test folder not the original file date.&lt;/P&gt;&lt;P&gt;filename mypipe pipe 'dir "C:\LocalData\AccessTest\*.mdb" /tw';&lt;/P&gt;&lt;P&gt;data use_date;&lt;BR /&gt;&amp;nbsp; attrib&amp;nbsp; buffer format=$2000.&lt;BR /&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; file_last_written_date format=date9.&lt;BR /&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; file_last_written_time format=time5.&lt;BR /&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; am_pm format=$2.&lt;BR /&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; file_size format=$30.&lt;BR /&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; file_name format=$50.;&lt;BR /&gt;&amp;nbsp; infile mypipe truncover ;&lt;BR /&gt;&amp;nbsp; input buffer $2000.;&lt;BR /&gt;&amp;nbsp; if substr(buffer,1,5) in ("Volum","Direc") or index(buffer,"&amp;lt;DIR&amp;gt;")&amp;gt;0 or index(buffer,"Dir(s)")&amp;gt;0 or index(buffer,"File(s)")&amp;gt;0 then delete;&amp;nbsp; /* Remove some extra info */&lt;BR /&gt;&amp;nbsp; file_last_written_date=input(put(scan(compbl(buffer),1,' '),$10.),mmddyy10.);&amp;nbsp; /* note dependant on system settings */&lt;BR /&gt;&amp;nbsp; file_last_written_time=input(put(scan(compbl(buffer),2,' '),$5.),time5.);&lt;BR /&gt;&amp;nbsp; am_pm=scan(compbl(buffer),3,' ');&lt;BR /&gt;&amp;nbsp; file_size=scan(compbl(buffer),4,' ');&lt;BR /&gt;&amp;nbsp; file_name=trim(scan(compbl(buffer),5,' ')) ;&lt;BR /&gt;&amp;nbsp; if file_name = ' ' then delete ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;proc print data = use_date ;&lt;BR /&gt; var file_name file_last_written_date ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I changed my CALL SYMPUT step to create a macro variable for the crdate as well as the file name, and then you would change the Driver macro and your own Macro program to have two parameters.&lt;/P&gt;&lt;P&gt;* read set of filenames that are now sorted and generate macro variables ;&lt;BR /&gt;data work.use_date;&lt;BR /&gt;&amp;nbsp; set work.use_date end=EOF ;&lt;BR /&gt;&amp;nbsp; CALL SYMPUT('file' || trim(left(_n_)), trim(file_name) ) ;&lt;BR /&gt;&amp;nbsp; CALL SYMPUT('crdate' || trim(left(_n_)) , PUT(file_last_written_date,date7.)) ;&lt;BR /&gt;&amp;nbsp; if EOF then CALL SYMPUT('filecount', _n_) ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;* this will give you macros file1, file2, etc. ;&lt;BR /&gt;%put file count = &amp;amp;filecount ;&lt;BR /&gt;%put file1 = &amp;amp;file1, crdate1 = &amp;amp;crdate1 ;&lt;/P&gt;&lt;P&gt;** NEW: Driver macro that will loop through list of files ;&lt;BR /&gt;%macro LoopFiles ;&lt;BR /&gt;&amp;nbsp; %if &amp;amp;filecount &amp;gt; 0 %then %do ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i = 1 %to &amp;amp;filecount ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %check_new_date(&amp;amp;&amp;amp;file&amp;amp;i, &amp;amp;&amp;amp;crdate&amp;amp;i);&amp;nbsp; *notice recursive macro syntax - resolve &amp;amp;i then resolve &amp;amp;file1, etc..;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end ;&lt;BR /&gt;&amp;nbsp; %end ;&lt;BR /&gt;%mend LoopFiles ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your macro:&lt;/P&gt;&lt;P&gt;%macro check_new_date(thisfile, thiscrdate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if "&amp;amp;thiscrdate"d = %sysfunc(today()) %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&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; abort return;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data check1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;%mend ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;** call driver macro ;&lt;/P&gt;&lt;P&gt;%LoopFiles;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that I have used double-quotes around the date macro variable, and convert it from a text string to a SAS date with the "d' syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that you will consider trying my driver macro approach, with the parsing of the piped filelist outside of (and above) your macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 02:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183266#M14083</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2014-04-24T02:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183267#M14084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot cwilson - it worked great...i just used proc sql to get "crdate" as macro variable after your first data step and proc print step. And then my macros....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all... &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>Thu, 24 Apr 2014 18:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183267#M14084</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-24T18:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183268#M14085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi cwilson - however, i am still not sure how you explain below steps in your above code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;* this will give you macros file1, file2, etc. ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%put file count = &amp;amp;filecount ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%put file1 = &amp;amp;file1, crdate1 = &amp;amp;crdate1 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 22:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183268#M14085</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-24T22:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183269#M14086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After you produce the sas dataset, work.use_date, that contains one row for each file in your file list, the next data step uses CALL SYMPUT to create macro variables.&amp;nbsp; It uses the _n_ variable as a suffix on the macro variable name.&amp;nbsp; I am creating a macro variable for the name of the file, and another macro variable for the create date.&amp;nbsp; Finally, at the end of the file (flagged by end=EOF), I output a macro variable with the total number of files, which I then use to loop through the list.&lt;/P&gt;&lt;P&gt;So if you have 5 files, you will have the following set of macro variables:&lt;/P&gt;&lt;P&gt;&amp;amp;file1&amp;nbsp; &amp;amp;crdate1&lt;/P&gt;&lt;P&gt;&amp;amp;file2&amp;nbsp; &amp;amp;crdate2, etc.&lt;/P&gt;&lt;P&gt;&amp;amp;file5&amp;nbsp; &amp;amp;crdate5&lt;/P&gt;&lt;P&gt;&amp;amp;filecount (which = 5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The %PUT statement is just to show the values for a few variables as a QC that it's working as desired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 22:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183269#M14086</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2014-04-24T22:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: using proc contents variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183270#M14087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay i understand that part but is there any other way to loop every .mdb files (lets's say we have 5 files to check date and then condition) with &lt;STRONG&gt;crdate...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;** NEW: Driver macro that will loop through list of files ;&lt;BR /&gt;%macro LoopFiles ;&lt;BR /&gt;&amp;nbsp; %if &amp;amp;filecount &amp;gt; 0 %then %do ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i = 1 %to &amp;amp;filecount ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %check_new_date(&amp;amp;&amp;amp;file&amp;amp;i, &amp;amp;&amp;amp;crdate&amp;amp;i);&amp;nbsp; *notice recursive macro syntax - resolve &amp;amp;i then resolve &amp;amp;file1, etc..;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end ;&lt;BR /&gt;&amp;nbsp; %end ;&lt;BR /&gt;%mend LoopFiles ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;*Your macro;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%macro check_new_date(thisfile, thiscrdate);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; %if "&amp;amp;thiscrdate"d = %sysfunc(today()) %then %do;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;.....&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;*if i alter your above piece of code like this&lt;/STRONG&gt;;&lt;STRONG&gt; /*this is from log*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;%macro LoopFiles_and_trans (thisfile, thiscrdate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if &amp;amp;filecount &amp;gt; 0 %then %do ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i = 1 %to &amp;amp;filecount ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %check_new_date(&amp;amp;&amp;amp;file&amp;amp;i, &amp;amp;&amp;amp;crdate&amp;amp;i);&amp;nbsp; *notice recursive macro syntax - resolve &amp;amp;i then resolve &amp;amp;file1, etc..;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; -&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Warning: Apparent invocation of macro CHECK_NEW_DATE not resolved&lt;/STRONG&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if "&amp;amp;thiscrdate"d = %sysfunc(today()) %then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;/*i am getting error&lt;/STRONG&gt;*/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ERROR: 180-322: statement is not valid or it is used out of proper order...&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 23:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-proc-contents-variable/m-p/183270#M14087</guid>
      <dc:creator>jimksas</dc:creator>
      <dc:date>2014-04-24T23:45:45Z</dc:date>
    </item>
  </channel>
</rss>

