<?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: Extract SP Execution properties in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583858#M5923</link>
    <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;You can try running this using PROC HTTP, and then use DATA step code to parse the HTML that is returned:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;http://server:port/SASStoredProcess/guest?_debug=list&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It provides some of the properties of all stored processes on the system.&amp;nbsp; Execute the URL using a Web browser to see the properties that are returned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2019 12:14:27 GMT</pubDate>
    <dc:creator>Vince_SAS</dc:creator>
    <dc:date>2019-08-26T12:14:27Z</dc:date>
    <item>
      <title>Extract SP Execution properties</title>
      <link>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583495#M5920</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract the following execution property of a Stored Process.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SP.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31979i3CC4CD8B35D8636F/image-size/large?v=v2&amp;amp;px=999" role="button" title="SP.png" alt="SP.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried Proc STP; list group=executtion; run; but could only get the following properties:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SP.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31980i4B9887CBAA07ECE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SP.png" alt="SP.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find out the server type on which the SP is to be executed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I want to produce a SAS data set listing all properties of SAS Stored Process, including the above property I mentioned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 14:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583495#M5920</guid>
      <dc:creator>AnjaliNair</dc:creator>
      <dc:date>2019-08-23T14:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract SP Execution properties</title>
      <link>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583536#M5921</link>
      <description>&lt;P&gt;Here you go:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let path_to_my_stp="/some/path/mySTP";

data _null_;
  length uri type serveruri $256.;
  path="&amp;amp;path_to_my_stp";
  if metadata_pathobj("",path,"StoredProcess",type,uri)&amp;gt;0 then 
    call symputx('uri',uri);
run;

data associations;
  keep assoc assocuri name;
  length assoc assocuri name $256;
  rc1=1;n1=1;
  do while(rc1&amp;gt;0);
    /* Walk through all possible associations of this object. */
    rc1=metadata_getnasl("&amp;amp;uri",n1,assoc);
    rc2=1;n2=1;
    do while(rc2&amp;gt;0);
      /* Walk through all the associations on this machine object. */
      rc2=metadata_getnasn("&amp;amp;uri",trim(assoc),n2,assocuri);
      if (rc2&amp;gt;0) then do;
        rc3=metadata_getattr(assocuri,"Name",name);
        output;
      end;
      call missing(name,assocuri);
      put arc= rc2=;
      n2+1;
    end;
    n1+1;
  end;
run;
proc sort data=associations;
  by assoc name;
run;


data attrprop;
  keep type name value;
  length type $4 name $256 value $32767;
  rc1=1;n1=1;type='Prop';
  do while(rc1&amp;gt;0);
    rc1=metadata_getnprp("&amp;amp;uri",n1,name,value);
    if rc1&amp;gt;0 then output;
    n1+1;
  end;
  rc1=1;n1=1;type='Attr';
  do while(rc1&amp;gt;0);
    rc1=metadata_getnatr("&amp;amp;uri",n1,name,value);
    if rc1&amp;gt;0 then output;
    n1+1;
  end;
run;
proc sort data=attrprop;
  by type name;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;By the way - the above code was taken from our free SAS 9 web application for exploring metadata - you can check it out and deploy it yourself, it's the web equivalent of METABROWSE:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/Boemska/metanav" target="_blank" rel="noopener"&gt;https://github.com/Boemska/metanav&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the off-chance that you're extracting all these details so you can make your own STP, programmatically - let me save you some time:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sasjs/core/blob/main/meta/mm_createstp.sas" target="_blank" rel="noopener"&gt;https://github.com/sasjs/core/blob/main/meta/mm_createstp.sas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 20:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583536#M5921</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-10-13T20:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extract SP Execution properties</title>
      <link>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583853#M5922</link>
      <description>&lt;P&gt;Hello Allan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your quick reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I executed the provided code, it is giving me all properties except the one I mentioned, which is to see the how a particular stored process is configured to execute on which server - Workspace, SP or default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 11:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583853#M5922</guid>
      <dc:creator>AnjaliNair</dc:creator>
      <dc:date>2019-08-26T11:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extract SP Execution properties</title>
      <link>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583858#M5923</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;You can try running this using PROC HTTP, and then use DATA step code to parse the HTML that is returned:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;http://server:port/SASStoredProcess/guest?_debug=list&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It provides some of the properties of all stored processes on the system.&amp;nbsp; Execute the URL using a Web browser to see the properties that are returned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 12:14:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/583858#M5923</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2019-08-26T12:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extract SP Execution properties</title>
      <link>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/585625#M5924</link>
      <description>&lt;P&gt;I suggest deploying the metanav application to see how to extract this info:&amp;nbsp; &lt;A href="https://github.com/Boemska/metanav" target="_blank"&gt;&lt;SPAN style="font-weight: 400;"&gt;https://github.com/Boemska/metanav&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 14:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Extract-SP-Execution-properties/m-p/585625#M5924</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2019-09-02T14:43:57Z</dc:date>
    </item>
  </channel>
</rss>

