<?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: VBScripting in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53288#M5662</link>
    <description>Thanks.  This is exactly what I needed.</description>
    <pubDate>Wed, 20 Apr 2011 14:13:59 GMT</pubDate>
    <dc:creator>cjohnson</dc:creator>
    <dc:date>2011-04-20T14:13:59Z</dc:date>
    <item>
      <title>VBScripting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53286#M5660</link>
      <description>I am trying to learn more about using VBScript to run SAS processes.  I have written the script below just to open and run a few code files in SAS EG, but this is as far as I got.  Is there any good reference for this?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
'Set ErrorHandler&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
'Run Daily&lt;BR /&gt;
ProjectName = "\\Nasvs1\Shared\4700Mac\Shared3\Actuarial\SAS\Projects\ISO.egp"&lt;BR /&gt;
Files = Array("LIBRARIES", "PLCY")&lt;BR /&gt;
Call Work(ProjectName, Files)&lt;BR /&gt;
&lt;BR /&gt;
'Define Functions&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;
			&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;
'Reset Error Handler&lt;BR /&gt;
On Error Goto 0</description>
      <pubDate>Tue, 19 Apr 2011 16:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53286#M5660</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2011-04-19T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: VBScripting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53287#M5661</link>
      <description>Here is some reference documentation.&lt;BR /&gt;
&lt;BR /&gt;
For 4.1:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/onlinedoc/guide/SASEGScripting41.zip" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/guide/SASEGScripting41.zip&lt;/A&gt; &lt;BR /&gt;
&lt;BR /&gt;
For 4.2, and generally useful for 4.3 as well (no substantive changes):&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/onlinedoc/guide/SASEGScripting42.zip" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/guide/SASEGScripting42.zip&lt;/A&gt; &lt;BR /&gt;
&lt;BR /&gt;
Also, there are several examples at (for 4.2 or 4.3):&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/40/781.html" target="_blank"&gt;http://support.sas.com/kb/40/781.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Wed, 20 Apr 2011 14:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53287#M5661</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2011-04-20T14:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: VBScripting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53288#M5662</link>
      <description>Thanks.  This is exactly what I needed.</description>
      <pubDate>Wed, 20 Apr 2011 14:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScripting/m-p/53288#M5662</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2011-04-20T14:13:59Z</dc:date>
    </item>
  </channel>
</rss>

