<?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 VBScript Error Running a SAS Project in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-Error-Running-a-SAS-Project/m-p/713118#M38002</link>
    <description>&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;I am trying to run a SAS EG 7.1 project with Ordered List from a VBScript (below). It seems to execute just fine but after about two minutes I get an error about missing parameters. It finds and runs my Ordered List but then returns the error. Sounds like it is looking for a parameter for the ordered list, but I don't have parameters for it. Any assistance would e greatly appreciated.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Option Explicit&lt;BR /&gt;Dim Application&lt;BR /&gt;Dim Project&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Dim orderedListContainer&lt;BR /&gt;Dim orderedList&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Change if running a different version of EG&lt;BR /&gt;Dim egVersion &lt;BR /&gt;egVersion = "SASEGObjectModel.Application.7.1"&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;'If WScript.Arguments.Count = 0 Then&lt;BR /&gt;'&amp;nbsp; WScript.Echo "ERROR: Expecting the full path name of a project file"&lt;BR /&gt;'&amp;nbsp; WScript.Quit -1&lt;BR /&gt;'End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Create a new SAS Enterprise Guide automation session&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;Set Application = WScript.CreateObject(egVersion)&lt;BR /&gt;WScript.Echo "Opening project: " &amp;amp; WScript.Arguments.Item(0)&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp; WScript.Echo "ERROR: Need help with 'Set Application = WScript.CreateObject(egVersion)'" &lt;BR /&gt;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Open the EGP file with the Application&lt;BR /&gt;Set Project = Application.Open(WScript.Arguments.Item(0),"Weekend Data Validation 7.1 Version.egp")&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp; WScript.Echo "ERROR: Unable to open " _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; WScript.Arguments.Item(0) &amp;amp; " as a project file"&lt;BR /&gt;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Set orderedListContainer = Project.ContainerCollection.Item("Ordered Lists")&lt;BR /&gt;For Each orderedList in orderedListContainer.Items&lt;BR /&gt;&amp;nbsp;&amp;nbsp;WScript.Echo orderedList.Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If orderedList.Name = "OrderList" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orderedList.Run&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo "Error: " &amp;amp; Err.Description&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;Next&lt;BR /&gt;If Checkerror("OrderedList.Run") = True Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;WScript.Echo orderedListContainer.Items&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo "Error Finding OrderList " &amp;amp; Err.Description&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VBS Error.jpg" style="width: 388px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53752iACCA79C27ACCC410/image-size/large?v=v2&amp;amp;px=999" role="button" title="VBS Error.jpg" alt="VBS Error.jpg" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 21 Jan 2021 16:28:14 GMT</pubDate>
    <dc:creator>JeffreyLowe</dc:creator>
    <dc:date>2021-01-21T16:28:14Z</dc:date>
    <item>
      <title>VBScript Error Running a SAS Project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-Error-Running-a-SAS-Project/m-p/713118#M38002</link>
      <description>&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;I am trying to run a SAS EG 7.1 project with Ordered List from a VBScript (below). It seems to execute just fine but after about two minutes I get an error about missing parameters. It finds and runs my Ordered List but then returns the error. Sounds like it is looking for a parameter for the ordered list, but I don't have parameters for it. Any assistance would e greatly appreciated.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Option Explicit&lt;BR /&gt;Dim Application&lt;BR /&gt;Dim Project&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Dim orderedListContainer&lt;BR /&gt;Dim orderedList&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Change if running a different version of EG&lt;BR /&gt;Dim egVersion &lt;BR /&gt;egVersion = "SASEGObjectModel.Application.7.1"&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;'If WScript.Arguments.Count = 0 Then&lt;BR /&gt;'&amp;nbsp; WScript.Echo "ERROR: Expecting the full path name of a project file"&lt;BR /&gt;'&amp;nbsp; WScript.Quit -1&lt;BR /&gt;'End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Create a new SAS Enterprise Guide automation session&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;Set Application = WScript.CreateObject(egVersion)&lt;BR /&gt;WScript.Echo "Opening project: " &amp;amp; WScript.Arguments.Item(0)&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp; WScript.Echo "ERROR: Need help with 'Set Application = WScript.CreateObject(egVersion)'" &lt;BR /&gt;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Open the EGP file with the Application&lt;BR /&gt;Set Project = Application.Open(WScript.Arguments.Item(0),"Weekend Data Validation 7.1 Version.egp")&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp; WScript.Echo "ERROR: Unable to open " _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; WScript.Arguments.Item(0) &amp;amp; " as a project file"&lt;BR /&gt;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Set orderedListContainer = Project.ContainerCollection.Item("Ordered Lists")&lt;BR /&gt;For Each orderedList in orderedListContainer.Items&lt;BR /&gt;&amp;nbsp;&amp;nbsp;WScript.Echo orderedList.Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If orderedList.Name = "OrderList" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orderedList.Run&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo "Error: " &amp;amp; Err.Description&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;Next&lt;BR /&gt;If Checkerror("OrderedList.Run") = True Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;WScript.Echo orderedListContainer.Items&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo "Error Finding OrderList " &amp;amp; Err.Description&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VBS Error.jpg" style="width: 388px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53752iACCA79C27ACCC410/image-size/large?v=v2&amp;amp;px=999" role="button" title="VBS Error.jpg" alt="VBS Error.jpg" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Jan 2021 16:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-Error-Running-a-SAS-Project/m-p/713118#M38002</guid>
      <dc:creator>JeffreyLowe</dc:creator>
      <dc:date>2021-01-21T16:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript Error Running a SAS Project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-Error-Running-a-SAS-Project/m-p/713213#M38003</link>
      <description>&lt;P&gt;I resolved the issue myself. Rather than deleting my original question I am going to leave it up to hopefully help someone else attempting the same thing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in SAS EG 7.1, you don't have to run the OrderedList, just open the project and run the project. The portion of the code below in &lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;RED&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt; is not needed. Issuing Project.Run will kick off the project and execute the Ordered List.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Option Explicit&lt;BR /&gt;Dim Application&lt;BR /&gt;Dim Project&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Dim orderedListContainer&lt;BR /&gt;Dim orderedList&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Change if running a different version of EG&lt;BR /&gt;Dim egVersion &lt;BR /&gt;egVersion = "SASEGObjectModel.Application.7.1"&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;'If WScript.Arguments.Count = 0 Then&lt;BR /&gt;'&amp;nbsp; WScript.Echo "ERROR: Expecting the full path name of a project file"&lt;BR /&gt;'&amp;nbsp; WScript.Quit -1&lt;BR /&gt;'End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Create a new SAS Enterprise Guide automation session&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;Set Application = WScript.CreateObject(egVersion)&lt;BR /&gt;WScript.Echo "Opening project: " &amp;amp; WScript.Arguments.Item(0)&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp; WScript.Echo "ERROR: Need help with 'Set Application = WScript.CreateObject(egVersion)'" &lt;BR /&gt;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;' Open the EGP file with the Application&lt;BR /&gt;Set Project = Application.Open(WScript.Arguments.Item(0),"Weekend Data Validation 7.1 Version.egp")&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp; WScript.Echo "ERROR: Unable to open " _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; WScript.Arguments.Item(0) &amp;amp; " as a project file"&lt;BR /&gt;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;else&lt;BR /&gt;&amp;nbsp;WScript.Echo "Attempting to run the Project " &amp;amp; project&lt;BR /&gt;&amp;nbsp;Project.run&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;" color="#ff0000"&gt;/*&lt;BR /&gt;Set orderedListContainer = Project.ContainerCollection.Item("Ordered Lists")&lt;BR /&gt;For Each orderedList in orderedListContainer.Items&lt;BR /&gt;&amp;nbsp;&amp;nbsp;WScript.Echo orderedList.Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If orderedList.Name = "OrderList" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;WScript.Echo "Orderedlist.name is: " &amp;amp; orderedlist.name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orderedList.Run()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;Next&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;" color="#ff0000"&gt;If Checkerror("OrderedList.Run") = True Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo Err.Description&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Quit -1&lt;BR /&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Jan 2021 20:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBScript-Error-Running-a-SAS-Project/m-p/713213#M38003</guid>
      <dc:creator>JeffreyLowe</dc:creator>
      <dc:date>2021-01-21T20:30:25Z</dc:date>
    </item>
  </channel>
</rss>

