<?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: Creator of table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176454#M302288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK, SAS does not store the identity of the creator in the dataset metadata. At least sashelp.vtable and dictionary.tables do not show that information.&lt;/P&gt;&lt;P&gt;proc contents does list the Owner Name in its listing output in the Engine/Host Dependent Information section, but you would have to fiddle around with rerouting the output to a file and then interpret that.&lt;/P&gt;&lt;P&gt;Depending on your operating system platform, it would be easier to just do a detailed directory listing and read the original creator from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg on UNIX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename oscmd pipe "ls -l directory|grep sas7bdat"; * where directory is the path to your library;&lt;/P&gt;&lt;P&gt;data ownlist;&lt;/P&gt;&lt;P&gt;infile oscmd;&lt;/P&gt;&lt;P&gt;length&lt;/P&gt;&lt;P&gt;&amp;nbsp; owner $8&lt;/P&gt;&lt;P&gt;&amp;nbsp; filname $50&lt;/P&gt;&lt;P&gt;&amp;nbsp; memname $32&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;owner = scan(_infile_,3," ");&lt;/P&gt;&lt;P&gt;filname = scan(_infile_,9," ");&lt;/P&gt;&lt;P&gt;memname = scan(filname,1,".")&lt;/P&gt;&lt;P&gt;drop filname;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Feb 2015 11:51:58 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2015-02-20T11:51:58Z</dc:date>
    <item>
      <title>Creator of table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176453#M302287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this code to know the size of a table in the data :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;ods output members=work.taille;&lt;/P&gt;&lt;P&gt;proc datasets lib=SASDATA mt=data;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, i would like to have the results and know the creator/owner of the table. It's possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Olivier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 10:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176453#M302287</guid>
      <dc:creator>olivier_guitton</dc:creator>
      <dc:date>2015-02-20T10:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creator of table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176454#M302288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK, SAS does not store the identity of the creator in the dataset metadata. At least sashelp.vtable and dictionary.tables do not show that information.&lt;/P&gt;&lt;P&gt;proc contents does list the Owner Name in its listing output in the Engine/Host Dependent Information section, but you would have to fiddle around with rerouting the output to a file and then interpret that.&lt;/P&gt;&lt;P&gt;Depending on your operating system platform, it would be easier to just do a detailed directory listing and read the original creator from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg on UNIX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename oscmd pipe "ls -l directory|grep sas7bdat"; * where directory is the path to your library;&lt;/P&gt;&lt;P&gt;data ownlist;&lt;/P&gt;&lt;P&gt;infile oscmd;&lt;/P&gt;&lt;P&gt;length&lt;/P&gt;&lt;P&gt;&amp;nbsp; owner $8&lt;/P&gt;&lt;P&gt;&amp;nbsp; filname $50&lt;/P&gt;&lt;P&gt;&amp;nbsp; memname $32&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;owner = scan(_infile_,3," ");&lt;/P&gt;&lt;P&gt;filname = scan(_infile_,9," ");&lt;/P&gt;&lt;P&gt;memname = scan(filname,1,".")&lt;/P&gt;&lt;P&gt;drop filname;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 11:51:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176454#M302288</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-02-20T11:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creator of table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176455#M302289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, SAS is under Windows, the code seems work. But, i haven't enough authorization to pipe access. Maybe only super admin could access to this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 08:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176455#M302289</guid>
      <dc:creator>olivier_guitton</dc:creator>
      <dc:date>2015-02-23T08:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creator of table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176456#M302290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, you problem looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS does not store the identity of the creator of a dataset on its own.&lt;/P&gt;&lt;P&gt;Said identity is only accessible trough operating system functions&lt;/P&gt;&lt;P&gt;You cannot access the OS functions from SAS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you either have to get that information outside of SAS, or the SAS admin needs to enable xcmd for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Info on getting file owner in windows&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.technet.com/b/heyscriptingguy/archive/2008/04/15/how-can-i-use-windows-powershell-to-determine-the-owner-of-a-file.aspx" title="http://blogs.technet.com/b/heyscriptingguy/archive/2008/04/15/how-can-i-use-windows-powershell-to-determine-the-owner-of-a-file.aspx"&gt; Hey, Scripting Guy! How Can I Use Windows PowerShell to Determine the Owner of a File? - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(After reading that, I once again am aware how blessed I am to run SAS on a UNIX server; one can clearly see how user security was bolted on sideways very late in the Windows development history)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 08:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creator-of-table/m-p/176456#M302290</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-02-23T08:37:26Z</dc:date>
    </item>
  </channel>
</rss>

