<?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: Running SAS EG project using power shell scripts. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523842#M32762</link>
    <description>&lt;P&gt;While I've never tried it myself, I would say the answer to running an EGP with local SAS from Powershell would be yes. I suggest you try scheduling via the EG scheduling option first. The resultant VBscript should then give you clues to what Powershell equivalent should be.&lt;/P&gt;</description>
    <pubDate>Sat, 29 Dec 2018 20:50:32 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-12-29T20:50:32Z</dc:date>
    <item>
      <title>Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523805#M32758</link>
      <description>&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Base SAS code&amp;nbsp; (say somefile.sas) can be run in batch mode on base SAS .&lt;/P&gt;&lt;P&gt;Can we similarly run the SASEGP project on base sas&amp;nbsp; (with SAS EG installed) on a&amp;nbsp; desktop using power shell (not vbscript). My idea is to us code something like this&lt;/P&gt;&lt;P&gt;$my_object=SASEGApplication.Model.Application7.1&lt;/P&gt;&lt;P&gt;$my_egp =new-object -cpmObject $ob&lt;/P&gt;&lt;P&gt;$EGP.open ("D:\my_egp_projec.egp", "")&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;I know Chris Hemedinger has written a number of blogs on similar topic, but I could not find the answer to my question.&lt;/P&gt;&lt;P&gt;Has anybody used a similar approach&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Dec 2018 22:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523805#M32758</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2018-12-28T22:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523806#M32759</link>
      <description>&lt;P&gt;Does this link help? &lt;A href="https://blogs.sas.com/content/sasdummy/tag/powershell/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/tag/powershell/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 22:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523806#M32759</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-12-28T22:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523827#M32760</link>
      <description>&lt;P&gt;Yes, you can drive the EG automation interface via Powershell.&amp;nbsp; Here are a couple examples (in same thread):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Auto-Purge-Project-Log-in-EG/m-p/439805/highlight/true#M28412" target="_self"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Auto-Purge-Project-Log-in-EG/m-p/439805/highlight/true#M28412&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Auto-Purge-Project-Log-in-EG/m-p/440554/highlight/true#M28437" target="_self"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Auto-Purge-Project-Log-in-EG/m-p/440554/highlight/true#M28437&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Sat, 29 Dec 2018 16:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523827#M32760</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2018-12-29T16:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523832#M32761</link>
      <description>&lt;P&gt;Thanks SASKiwi and Casey Smith for inviting my attention to examples of the &lt;STRONG&gt;capabilities&lt;/STRONG&gt; of Powershell - SAS automation.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question is about the requirement to carry out such tasks and not capabilities.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My question is can I&amp;nbsp;run a SAS EG project in a batch mode&amp;nbsp; with Base SAS and SAS EG installed locally&amp;nbsp; say a laptop or a desktop (and more specifically not a server installation so no metadata server available - either locally or remote)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Dec 2018 17:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523832#M32761</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2018-12-29T17:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523842#M32762</link>
      <description>&lt;P&gt;While I've never tried it myself, I would say the answer to running an EGP with local SAS from Powershell would be yes. I suggest you try scheduling via the EG scheduling option first. The resultant VBscript should then give you clues to what Powershell equivalent should be.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Dec 2018 20:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523842#M32762</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-12-29T20:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523908#M32763</link>
      <description>&lt;P&gt;That is correct.&amp;nbsp; The answer is yes.&amp;nbsp; You can run an EG project with local SAS via Powershell, similar to the way you can with VBScript.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Mon, 31 Dec 2018 04:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/523908#M32763</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2018-12-31T04:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/524906#M32786</link>
      <description>&lt;P&gt;Thanks everybody for your time and efforts in answering my question.&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;I agree that it is possible to schedule SAS EGP using vbscript . Thanks for the answer.&lt;/STRONG&gt;&lt;BR /&gt;However as mentioned in my question and reproduced below :&lt;/P&gt;&lt;P&gt;$my_object=SASEGApplication.Model.Application7.1&lt;/P&gt;&lt;P&gt;$my_egp =new-object -cpmObject $ob&lt;/P&gt;&lt;P&gt;$EGP.open ("D:\my_egp_projec.egp", "")&lt;/P&gt;&lt;P&gt;This is creating an EG object .&amp;nbsp; &amp;nbsp;As I understand&amp;nbsp; now this involve the IOM object module.&lt;BR /&gt;This requires access to metadata server/Object spawner/workspace server.&lt;/P&gt;&lt;P&gt;So this approach is not possible on PC SAS with no access SAS Server.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks once again everybody for their time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jan 2019 16:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/524906#M32786</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2019-01-06T16:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS EG project using power shell scripts.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/525254#M32813</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/131732"&gt;@Sajid01&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These statements are not quite correct:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;This requires access to metadata server/Object spawner/workspace server.&lt;/P&gt;
&lt;P&gt;So this approach is not possible on PC SAS with no access SAS Server.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If your EG project has programs or tasks that were defined to run on a remote workspace server, then yes,&amp;nbsp;running it via the automation interface will attempt to connect to the same remote workspace server (and metadata server and object spawner) to run it.&amp;nbsp; (It runs the same way as if you ran it in an interactive EG session.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if you have PC SAS and your EG project has programs and tasks that were defined to run on your Local SAS server, then they will run on your Local Server without attempting a&amp;nbsp;remote connection.&amp;nbsp; So, this approach &lt;STRONG&gt;*is*&lt;/STRONG&gt; possible on PC SAS (which is a local SAS server).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Things to check to make sure your EG project runs on your local PC SAS...&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;In EG's Tools-&amp;gt;Connections, on the Servers tab, make sure you have &lt;STRONG&gt;Automatically add local SAS server (if installed) to server list&lt;/STRONG&gt;.&amp;nbsp; If you have a local server installed (ex. PC SAS), then it will appear in EG as a server named "Local" in your Servers list.&lt;/LI&gt;
&lt;LI&gt;Make sure the runnable items (ex. programs and tasks) defined in your EG project are set to run on the Local server.&amp;nbsp; In other words, if you run your project in an interactive EG session, only the Local server (no other remote workspace servers) should be connected to after the project finishes running.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Btw, anything you can do with the EG automation/scripting model from VBScript, you can also do from a Windows Powershell script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 22:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SAS-EG-project-using-power-shell-scripts/m-p/525254#M32813</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2019-01-07T22:22:23Z</dc:date>
    </item>
  </channel>
</rss>

