<?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: How to: Metadata Object Exists in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830857#M328317</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;I was a bit too quick to accept your post as solution.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Running below I get an rc of -2 which means "syntax error in path" even though I've copy/pasted the path directly from SMC as well as the table name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    length id $20;
    length type $256;
    proj="";
    deftype="";
    id="";
    type="";

    rc=metadata_pathobj(proj,"/Folder1/Folder 2/Data/Visual Analytics(CLASS_2)",
                        deftype,type,id);

    put rc=;
    put id=;
    put type=;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Not sure why that's not working given this is in the foundation repository and I'm creating this metadata table object with the same user (so not a permission issue).&lt;/P&gt;
&lt;P&gt;....and I actually found very similar code in the template I've used as a starting point of my code. Hmmm....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2022 09:52:30 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2022-08-29T09:52:30Z</dc:date>
    <item>
      <title>How to: Metadata Object Exists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830849#M328312</link>
      <description>&lt;P&gt;There must be some simple SAS syntax for this ...but just can't figure it out.&lt;/P&gt;
&lt;P&gt;I know the full metadata path and name for a metadata object (table). How can I test if this metadata object exists?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 08:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830849#M328312</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-29T08:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Metadata Object Exists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830850#M328313</link>
      <description>&lt;P&gt;Maybe you can try the&amp;nbsp;METADATA_PATHOBJ function. It returns -3 if the object is not found:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p1xunv8xz32p17n111eqr6edimy1.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p1xunv8xz32p17n111eqr6edimy1.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 08:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830850#M328313</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-08-29T08:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Metadata Object Exists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830857#M328317</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;I was a bit too quick to accept your post as solution.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Running below I get an rc of -2 which means "syntax error in path" even though I've copy/pasted the path directly from SMC as well as the table name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    length id $20;
    length type $256;
    proj="";
    deftype="";
    id="";
    type="";

    rc=metadata_pathobj(proj,"/Folder1/Folder 2/Data/Visual Analytics(CLASS_2)",
                        deftype,type,id);

    put rc=;
    put id=;
    put type=;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Not sure why that's not working given this is in the foundation repository and I'm creating this metadata table object with the same user (so not a permission issue).&lt;/P&gt;
&lt;P&gt;....and I actually found very similar code in the template I've used as a starting point of my code. Hmmm....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 09:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/830857#M328317</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-29T09:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Metadata Object Exists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/831036#M328394</link>
      <description>&lt;P&gt;It worked once I used syntax as per&amp;nbsp;&lt;A href="https://support.sas.com/kb/42/872.html" target="_blank"&gt;https://support.sas.com/kb/42/872.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 05:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/831036#M328394</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-30T05:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Metadata Object Exists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/831054#M328402</link>
      <description>I couldn't find the actual dftypes to use, just seeing som examples, not a complete list or reference in the doc?</description>
      <pubDate>Tue, 30 Aug 2022 09:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/831054#M328402</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-08-30T09:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to: Metadata Object Exists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/831061#M328407</link>
      <description>&lt;P&gt;The docu refers to SMC&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1661855479947.png" style="width: 1066px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74848i4EA12564D4950B44/image-dimensions/1066x72?v=v2" width="1066" height="72" role="button" title="Patrick_0-1661855479947.png" alt="Patrick_0-1661855479947.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p0i64g6kv9s3q3n1nqn17tap7l5b.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p0i64g6kv9s3q3n1nqn17tap7l5b.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 10:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Metadata-Object-Exists/m-p/831061#M328407</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-30T10:31:55Z</dc:date>
    </item>
  </channel>
</rss>

