Hello
Base SAS code (say somefile.sas) can be run in batch mode on base SAS .
Can we similarly run the SASEGP project on base sas (with SAS EG installed) on a desktop using power shell (not vbscript). My idea is to us code something like this
$my_object=SASEGApplication.Model.Application7.1
$my_egp =new-object -cpmObject $ob
$EGP.open ("D:\my_egp_projec.egp", "")
---------
I know Chris Hemedinger has written a number of blogs on similar topic, but I could not find the answer to my question.
Has anybody used a similar approach
Thanks everybody for your time and efforts in answering my question.
I agree that it is possible to schedule SAS EGP using vbscript . Thanks for the answer.
However as mentioned in my question and reproduced below :
$my_object=SASEGApplication.Model.Application7.1
$my_egp =new-object -cpmObject $ob
$EGP.open ("D:\my_egp_projec.egp", "")
This is creating an EG object . As I understand now this involve the IOM object module.
This requires access to metadata server/Object spawner/workspace server.
So this approach is not possible on PC SAS with no access SAS Server.
Thanks once again everybody for their time.
Does this link help? https://blogs.sas.com/content/sasdummy/tag/powershell/
Yes, you can drive the EG automation interface via Powershell. Here are a couple examples (in same thread):
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Thanks SASKiwi and Casey Smith for inviting my attention to examples of the capabilities of Powershell - SAS automation.
My question is about the requirement to carry out such tasks and not capabilities.
My question is can I run a SAS EG project in a batch mode with Base SAS and SAS EG installed locally say a laptop or a desktop (and more specifically not a server installation so no metadata server available - either locally or remote)
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.
That is correct. The answer is yes. You can run an EG project with local SAS via Powershell, similar to the way you can with VBScript.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Thanks everybody for your time and efforts in answering my question.
I agree that it is possible to schedule SAS EGP using vbscript . Thanks for the answer.
However as mentioned in my question and reproduced below :
$my_object=SASEGApplication.Model.Application7.1
$my_egp =new-object -cpmObject $ob
$EGP.open ("D:\my_egp_projec.egp", "")
This is creating an EG object . As I understand now this involve the IOM object module.
This requires access to metadata server/Object spawner/workspace server.
So this approach is not possible on PC SAS with no access SAS Server.
Thanks once again everybody for their time.
Hi @Sajid01,
These statements are not quite correct:
This requires access to metadata server/Object spawner/workspace server.
So this approach is not possible on PC SAS with no access SAS Server.
If your EG project has programs or tasks that were defined to run on a remote workspace server, then yes, 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. (It runs the same way as if you ran it in an interactive EG session.)
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 remote connection. So, this approach *is* possible on PC SAS (which is a local SAS server).
Things to check to make sure your EG project runs on your local PC SAS...
Btw, anything you can do with the EG automation/scripting model from VBScript, you can also do from a Windows Powershell script.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.