<?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 Get information about programs at SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677164#M204243</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi, I try to create a function that receives as input a folder name on the computer and outputs a list of all the programs in SAS that are in the folder with information about them such as path, creation date, etc.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2020 09:27:11 GMT</pubDate>
    <dc:creator>ohad_m</dc:creator>
    <dc:date>2020-08-17T09:27:11Z</dc:date>
    <item>
      <title>Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677164#M204243</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, I try to create a function that receives as input a folder name on the computer and outputs a list of all the programs in SAS that are in the folder with information about them such as path, creation date, etc.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 09:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677164#M204243</guid>
      <dc:creator>ohad_m</dc:creator>
      <dc:date>2020-08-17T09:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677166#M204245</link>
      <description>&lt;P&gt;In a data step, use the following functions:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n15scht124hr4nn1g296cqg2kqfa.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;FILENAME&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0hpa8p9kacbran1ndqiw3krwohq.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;DOPEN&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0m5yzvai5v9phn1gsdca9j6utzw.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;DNUM&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n1u8n0tue0ymkrn109xu8ya01kle.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;DREAD&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1fr3ny0ek8sr9n1pujj2om3bia7.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;FOPEN&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0cpuq4ew0dxipn1vtravlludjm7.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;FINFO&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0ihcrv5rt8mw4n16kqi1p9caq6i.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;FCLOSE&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n19037hth6jo52n14hqvcbjngw9e.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;DCLOSE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 09:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677166#M204245</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-17T09:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677167#M204246</link>
      <description>&lt;PRE class="tw-data-text tw-text-large XcVN5d tw-ta"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you havw an example ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 10:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677167#M204246</guid>
      <dc:creator>ohad_m</dc:creator>
      <dc:date>2020-08-17T10:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677171#M204248</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/341937"&gt;@ohad_m&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Hi, I try to create a function that receives as input a folder name on the computer and outputs a list of all the programs in SAS that are in the folder with information about them such as path, creation date, etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not clear what you want in the end, do you want to extract information visible to the operating system or do you want to extract information from the programs as well?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 10:39:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677171#M204248</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-08-17T10:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677172#M204249</link>
      <description>&lt;P&gt;I want to create a function that receives as input the name of a folder on a computer and outputs the names of all SAS programs that exist within the folder, their path, size, and creation date&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 10:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677172#M204249</guid>
      <dc:creator>ohad_m</dc:creator>
      <dc:date>2020-08-17T10:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677175#M204252</link>
      <description>&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let folder=/folders/myfolders;
%let outds=programs;

data &amp;amp;outds;
length dref fref $8 pname $200;
format timestamp e8601dt19. size comma10.;
did = filename(dref,"&amp;amp;folder.");
if did = 0
then do;
  did = dopen(dref);
  if did
  then do;
    do i = 1 to dnum(did);
      pname = dread(did,i);
      if upcase(scan(pname,-1,'.')) = "SAS"
      then do;
        pname = "&amp;amp;folder./" !! pname;
        fid = filename(fref,pname);
        if fid = 0
        then do;
          fid = fopen(fref);
          if fid
          then do;
            timestamp = input(finfo(fid,foptname(fid,5)),nldatm32.);
            size = input(finfo(fid,foptname(fid,6)),best.);
            fid = fclose(fid);
            output;
          end;
          else putlog "Could not open " pname;
          fid = filename(fref);
        end;
        else putlog "Could not assign filename for " pname;
      end;
    end;
    did = dclose(did);
  end;
  else putlog "Could not open directory";
  did = filename(dref);
end;
else putlog "Could not assign dref";
keep pname size timestamp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This code is tested on University Edition on my Mac.&lt;/P&gt;
&lt;P&gt;If you are using a different environment (namely Windows), the option number in the FOPTNAME function will most probably be different.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 11:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677175#M204252</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-17T11:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get information about programs at SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677176#M204253</link>
      <description>&lt;P&gt;PS the above is of course for those who do not enjoy the usage of external commands. With XCMD enabled, you just run ls (UNIX) or dir (Windows) with the correct parameters and read the output with FILENAME PIPE.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 11:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-information-about-programs-at-SAS/m-p/677176#M204253</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-17T11:51:06Z</dc:date>
    </item>
  </channel>
</rss>

