<?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: SAS Automation in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18929#M3286</link>
    <description>I had another thought about this.  In batch mode, I am able to start the application and choose a code file.  The error occurs when I try to run that code file, since I have no connection to the server.  Is there a way to choose the server, and set the credentials in the process?</description>
    <pubDate>Wed, 25 Nov 2009 16:50:15 GMT</pubDate>
    <dc:creator>cjohnson</dc:creator>
    <dc:date>2009-11-25T16:50:15Z</dc:date>
    <item>
      <title>SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18924#M3281</link>
      <description>I have written a vbscript to run SAS code file in EG.  I have set up the server to automatically run the vbscript.  Both of these work fine on my computer.  However, when I try to set up the server to automatically run the vbscript, it fails because the task is being run by the SASAdmin account, and I get the error cannot connect to SASMain.  I am not sure if this is standard for EG, but EG is set up to check the info in the personal login manager against the account info you used to log into windows.&lt;BR /&gt;
&lt;BR /&gt;
My question is, in the vbscript, when I call the sasprogram, can I set the credentials for SAS so it runs on the server, but uses my credentials.  I can enter my username and password, and then compile the script as an exe.  Here is my code:&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
ProjectName = "\\Nasvs1\Shared\4700Mac\Shared3\Actuarial\SAS\Projects\Refresh.egp"&lt;BR /&gt;
Files = Array("LIBNAMES", "DAILY")&lt;BR /&gt;
Call Work(ProjectName, Files)&lt;BR /&gt;
&lt;BR /&gt;
Sub Work(ProjectName, Files)&lt;BR /&gt;
	Set App = CreateObject("SASEGObjectModel.Application.4")&lt;BR /&gt;
	Set Project = App.Open(ProjectName,"")&lt;BR /&gt;
	Set Container = Project.CodeCollection&lt;BR /&gt;
	For Each File In Files&lt;BR /&gt;
		For Each Object In Container&lt;BR /&gt;
			If Object.Name = File Then Object.Run&lt;BR /&gt;
		Next&lt;BR /&gt;
	Next&lt;BR /&gt;
	Project.Save&lt;BR /&gt;
	Project.Close&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Any help is greatly appreciated.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Chris</description>
      <pubDate>Wed, 18 Nov 2009 15:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18924#M3281</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2009-11-18T15:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18925#M3282</link>
      <description>Chris,&lt;BR /&gt;
&lt;BR /&gt;
Try the instructions in:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/30/917.html" target="_blank"&gt;http://support.sas.com/kb/30/917.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
This will require that you have the most recent hotfixes for EG 4.1.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Thu, 19 Nov 2009 00:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18925#M3282</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2009-11-19T00:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18926#M3283</link>
      <description>Thanks.  I could not find any articles concerning what I wanted to do.  If I understand correctly, when the credentials file is in place, and I schedule a sas process, the vbscript file it generates should now have code added to pass the credentials to sas.  I have tried this, and it did not add any code and it still does not run.  Any idea what code it adds to the vbscript file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again,&lt;BR /&gt;
Chris</description>
      <pubDate>Fri, 20 Nov 2009 15:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18926#M3283</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2009-11-20T15:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18927#M3284</link>
      <description>The way this works is the automation process looks for the credentials file at runtime, and if it exists it tries to use the contained credentials to connect to resources (metadata, workspace, etc.).&lt;BR /&gt;
&lt;BR /&gt;
The VBScript code does not change at all.  The presence of the file with the correct contents is all you need.  However, the file needs to be located in the profile area of the account that is actually running the automated process.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Fri, 20 Nov 2009 16:33:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18927#M3284</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2009-11-20T16:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18928#M3285</link>
      <description>I have worked with my server administrator for several days, and we can not find a permanent way to make this work.  The admin needs to run this task as administrator or sasadm, rather than under my credentials, so the password does not change, and the script runs automatically.  However, I need to run the sas code under my credentials.&lt;BR /&gt;
&lt;BR /&gt;
I have created the credentials.xml file the paper describes using my username/password.  Is there any way to run this file or pass its values through the vbscript?</description>
      <pubDate>Wed, 25 Nov 2009 14:30:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18928#M3285</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2009-11-25T14:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18929#M3286</link>
      <description>I had another thought about this.  In batch mode, I am able to start the application and choose a code file.  The error occurs when I try to run that code file, since I have no connection to the server.  Is there a way to choose the server, and set the credentials in the process?</description>
      <pubDate>Wed, 25 Nov 2009 16:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18929#M3286</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2009-11-25T16:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Automation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18930#M3287</link>
      <description>You can choose the server, but not credentials.&lt;BR /&gt;
&lt;BR /&gt;
If the instructions don't work for you, please contact SAS Technical Support so that the problem can be tracked.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Tue, 01 Dec 2009 21:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Automation/m-p/18930#M3287</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2009-12-01T21:15:58Z</dc:date>
    </item>
  </channel>
</rss>

