<?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 Enterprise Guide with VBScript. Looping through SAS programs get stuck. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616080#M35375</link>
    <description>&lt;P&gt;Hmm, I see.&amp;nbsp; You can try modifying the options in Tools-&amp;gt;Options and bump these thresholds:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Results-&amp;gt;General, Prompt before opening results -- change to a high number like 50MB.&amp;nbsp; I think that applies to ODS and logs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also, you should consider tweaking your options and/or code to produce more concise results.&amp;nbsp; Generate graphs? Look at whether you are using the ActiveX device (large if you have graphs with lots of points).&amp;nbsp; And how verbose is your log output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you use the Project Log, change those properties for your project.&amp;nbsp; Right-click on the Project name in your project tree, select Properties, then Project Log.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2020 21:33:36 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2020-01-08T21:33:36Z</dc:date>
    <item>
      <title>SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/615727#M35353</link>
      <description>&lt;P&gt;Hello everyone.&lt;BR /&gt;&lt;BR /&gt;I'm facing a random problem. When executing SAS programs with VBScript and the&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;SASEGObjectModel.Application.7.1, looping&amp;nbsp;through&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;CodeCollection get stuck sometimes, even if the program execution was&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;succeeded (the final data bases are correctly created in our server). The script simple doesn't go to the next program of&amp;nbsp;&lt;SPAN&gt;&lt;SPAN&gt;CodeCollection (the prompt executing the script still open... ad infinitum). I'm going with something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;Dim oSasApp
Set oSasApp = CreateObject("SASEGObjectModel.Application.7.1")
oSasApp.SetActiveProfile("some-profile")

Dim oSasProj
Set oSasProj = oSasApp.Open("some-project.egp", "")

Dim oProgramList
Set oProgramList = oSasProj.CodeCollection

Dim programOrder
Set programOrder = ...here I assign the SAS programs order array reading from a .txt...

For Each program in programOrder
       For Each sasProgram in oProgramList
              If sasProgram.Name = program Then
                     sasProgram.Run
                     sasProgram.Log.SaveAs "some-folder/" &amp;amp; sasProgram.Name &amp;amp; ".txt"
              End If
       Next
Next

oSasProj.Close
oSasApp.Quit&lt;/PRE&gt;&lt;SPAN&gt;The problem is not the Log saving, as the log txt file of the stucked program is also correctly created.&lt;BR /&gt;&lt;BR /&gt;Any idea? Maybe problems in our SAS server? Should I declare some kind of options?&lt;BR /&gt;&lt;BR /&gt;SAS Guide version: 7.15&lt;BR /&gt;Windows: 10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Jan 2020 17:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/615727#M35353</guid>
      <dc:creator>traldim</dc:creator>
      <dc:date>2020-01-07T17:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/615729#M35354</link>
      <description>...the SAS program it stucks is random and also the frequency it happens.</description>
      <pubDate>Tue, 07 Jan 2020 17:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/615729#M35354</guid>
      <dc:creator>traldim</dc:creator>
      <dc:date>2020-01-07T17:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/615737#M35356</link>
      <description>&lt;P&gt;I suggest that you turn on Application Logging (in Tools-&amp;gt;Options).&amp;nbsp; This will create a CSCRIPT.nnnn.log file in your user profile area that contains lots of diagnostic info.&amp;nbsp; You might not be able to interpret it yourself, but if you track it with SAS Tech Support and supply a log file that represents when this problem occurs, the development team might be able to diagnose.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 18:22:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/615737#M35356</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-01-07T18:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616066#M35372</link>
      <description>&lt;P&gt;That is good info Chris.&lt;BR /&gt;&lt;BR /&gt;Just found out something that changes erverything and makes the problem simpler: if I press enter on prompt the script flows again. So it is waiting for my input. Can't understand why as I did't code anything for that in the .vbs file. Must be something with SAS Enterprise Guide. The data bases I'm manipulating are preatty big, the main programs takes something like 7 hours to run. I'm thinking if SAS Guide is asking anything to goes on. Maybe something related to the data size? Any idea what could be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tnks&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616066#M35372</guid>
      <dc:creator>traldim</dc:creator>
      <dc:date>2020-01-08T21:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616070#M35373</link>
      <description>&lt;P&gt;Is there a prompt displayed? Or in the command-line console?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616070#M35373</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-01-08T21:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616073#M35374</link>
      <description>&lt;P&gt;Nothing displayed on command line. I pressed enter by luck. When running directly with SAS Guide app something it prompts messages saying the log is too long, or that results are too long, asking for my OK (not sure about the messages). I'm thinking in something like that.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616073#M35374</guid>
      <dc:creator>traldim</dc:creator>
      <dc:date>2020-01-08T21:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616080#M35375</link>
      <description>&lt;P&gt;Hmm, I see.&amp;nbsp; You can try modifying the options in Tools-&amp;gt;Options and bump these thresholds:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Results-&amp;gt;General, Prompt before opening results -- change to a high number like 50MB.&amp;nbsp; I think that applies to ODS and logs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also, you should consider tweaking your options and/or code to produce more concise results.&amp;nbsp; Generate graphs? Look at whether you are using the ActiveX device (large if you have graphs with lots of points).&amp;nbsp; And how verbose is your log output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you use the Project Log, change those properties for your project.&amp;nbsp; Right-click on the Project name in your project tree, select Properties, then Project Log.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/616080#M35375</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-01-08T21:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Guide with VBScript. Looping through SAS programs get stuck.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/618081#M35412</link>
      <description>&lt;P&gt;For people facing the same problem, I did 2 things to get around it. Not sure if all of them are necessary or if only one solves it, but here it goes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, by VBScript I turned off a list of generations and I applied a delay after the SAS program runs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;For Each program in programOrder
       For Each sasProgram i oProgramList
              If sasProgram.Name = program Then
                     sasProgram.GenSasReport = False
                     sasProgram.GenHTML = False
                     sasProgram.GenListing = False
                     sasProgram.GenPDF = False
                     sasProgram.GenRTF = False
                     sasProgram.Run
                     WScript.Sleep(2000)
                     sasProgram.Log.SaveAs "some-folder/" &amp;amp; sasProgram.Name &amp;amp; ".txt"
              End If
       Next
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Them, in my batch file, wich I use to call the VBScript with the "cscript" command, I set it to apply "y" to every single message the VBScript could ask:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;cd ./script-folder
echo y | cscript script-file-name.vbs&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that is it.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 13:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Enterprise-Guide-with-VBScript-Looping-through-SAS-programs/m-p/618081#M35412</guid>
      <dc:creator>traldim</dc:creator>
      <dc:date>2020-01-17T13:58:36Z</dc:date>
    </item>
  </channel>
</rss>

