<?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: GETTING LAST MODIFIED DATE OF THE FILE IN SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909004#M358627</link>
    <description>&lt;P&gt;A number of ways.&lt;/P&gt;
&lt;P&gt;Completely in SAS you can use a combination of SAS external file functions:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/imlcdc/14.2/imlug/imlug_langref_sect561.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/imlcdc/14.2/imlug/imlug_langref_sect561.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Or you can use X command/filename pipe to execute a dir/ls command to retrieve that information.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 11:34:02 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2023-12-20T11:34:02Z</dc:date>
    <item>
      <title>GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909003#M358626</link>
      <description>I want to get last modified date of a file in my folder using SAS how can I do that? 
Any help is appreciated.</description>
      <pubDate>Wed, 20 Dec 2023 11:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909003#M358626</guid>
      <dc:creator>Kirito1</dc:creator>
      <dc:date>2023-12-20T11:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909004#M358627</link>
      <description>&lt;P&gt;A number of ways.&lt;/P&gt;
&lt;P&gt;Completely in SAS you can use a combination of SAS external file functions:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/imlcdc/14.2/imlug/imlug_langref_sect561.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/imlcdc/14.2/imlug/imlug_langref_sect561.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Or you can use X command/filename pipe to execute a dir/ls command to retrieve that information.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 11:34:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909004#M358627</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-12-20T11:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909044#M358634</link>
      <description>&lt;P&gt;Is the file in question a SAS data set, other SAS file or something external to SAS such as a text file read for data?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909044#M358634</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-12-20T15:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909162#M358643</link>
      <description>&lt;P&gt;Does this give you what you need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/40/934.html" target="_blank"&gt;https://support.sas.com/kb/40/934.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 20:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909162#M358643</guid>
      <dc:creator>grace_sas</dc:creator>
      <dc:date>2023-12-20T20:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909213#M358652</link>
      <description>&lt;P&gt;Its not a SAS data set its an external CSV file in my network folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to be clear I am able to import that CSV file using proc import. The task here for me is to check if the dumped file has last modified date of today then I want to schedule that job.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 06:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909213#M358652</guid>
      <dc:creator>Kirito1</dc:creator>
      <dc:date>2023-12-21T06:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909214#M358653</link>
      <description>&lt;P&gt;I read it all but unable to use it, Although what I found using google says the physical file does not exist but its there in my network folder. And I am able to import that same file using proc import&lt;/P&gt;
&lt;P&gt;The below is my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let filepath = /SAS_library/NAS_CA/QR/QR/Import_file/MERMAST_INFILE.csv;

data _null_;
lastmod = attrn("&amp;amp;filepath.", "LM");
put "Last Modified Date: " lastmod datetime.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please suggest what I should Do. Is there any solution for this.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 06:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909214#M358653</guid>
      <dc:creator>Kirito1</dc:creator>
      <dc:date>2023-12-21T06:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909215#M358654</link>
      <description>Thank You very much Yes it solve my problem.</description>
      <pubDate>Thu, 21 Dec 2023 06:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909215#M358654</guid>
      <dc:creator>Kirito1</dc:creator>
      <dc:date>2023-12-21T06:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: GETTING LAST MODIFIED DATE OF THE FILE IN SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909220#M358655</link>
      <description>&lt;P&gt;How about using &lt;A title="https://github.com/SASPAC/baseplus" href="https://github.com/SASPAC/baseplus" target="_self"&gt;BasePlus package&lt;/A&gt; and the &lt;A title="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#dirsandfiles-macro" href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#dirsandfiles-macro" target="_self"&gt;dirsAndFiles macro&lt;/A&gt;?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%dirsAndFiles(
  &amp;lt;/path/to/your/directory&amp;gt;
  ,ODS=work.outputDataSet
  ,keepDirs=0 /* ignore directories */
  ,details=1 /* get details */
  ,maxDepth=1 /* don't look in subdirectories */
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then use "LastModified" variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. To install and use basePlus package do:&amp;nbsp;&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;Enable the framework [first time only]:&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;LI-CODE lang="sas"&gt;filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
%include SPFinit; /* enable the framework */&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Install the framework and the package on your machine in the folder you created:&lt;/LI&gt;
&lt;LI&gt;&lt;LI-CODE lang="sas"&gt;filename packages "&amp;lt;/your/directory/for/packages/&amp;gt;"; 
%installPackage(SPFinit basePlus) &lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;From now on, in your SAS session just run it like this (you can put those 3 lines in autoexec):&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;LI-CODE lang="sas"&gt;filename packages "&amp;lt;/your/directory/for/packages/&amp;gt;";
%include packages(SPFinit.sas);

%loadPackage(basePlus)  &lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;A title="https://github.com/yabwon/SAS_PACKAGES?tab=readme-ov-file#the-user" href="https://github.com/yabwon/SAS_PACKAGES?tab=readme-ov-file#the-user" target="_self" rel="nofollow noopener noreferrer"&gt;Link to details&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 07:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GETTING-LAST-MODIFIED-DATE-OF-THE-FILE-IN-SAS/m-p/909220#M358655</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-12-21T07:18:54Z</dc:date>
    </item>
  </channel>
</rss>

