<?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 EG 6.1 scripting in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-6-1-scripting/m-p/191954#M14654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm testing Enterprise Guide 6.1 (64-bit) at our site but ran into a really weird problem trying to run programs in batch mode. Chris Hemedinger explains how to use VBScript to do this (&lt;A href="http://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/"&gt; Using SAS Enterprise Guide to run programs in batch - The SAS Dummy&lt;/A&gt;) and that worked fine using EG 4.3. Adapting the script for EG 6.1 was simple enough, just change &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;CreateObject("SASEGObjectModel.Application.4.3") to &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;CreateObject("SASEGObjectModel.Application.6.1"). The modified script worked if I ran it from a command line. Problem was, I wanted to use it in a text editor (PSPad) to run the current SAS file in batch. Using PSPad, I kept getting errors "&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Could not create object named "SASEGObjectModel.Application.6.1"". Using &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“c:\windows\system32\wscript.exe” or &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“c:\windows\sysWOW64\wscript.exe” made no difference.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;It turned out I had to use &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“C:\WINDOWS\&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt;sysnative&lt;/SPAN&gt;&lt;/SPAN&gt;\wscript.exe”. That is weird, since there is no &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“C:\WINDOWS\sysnative” directory.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This issue is due to the fact that PSPad is a 32-bit application but EG 6.1 is 64-bit. “%windir%\system32” on 64-bit systems is actually reserved for the 64-bit version of wscript and similar programs and dlls. “%windir%\sysWOW64” contains 32-bit versions. If a 32-bit application attempts to access “%windir%\system32”, it is redirected to “%windir%\sysWOW64”. Usually, that would be fine, but not for EG 6.1. In that case, “%windir%\sysnative” should be used. WOW64 recognises sysnative as a special alias to indicate that the file system should not redirect the access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="http://msdn.microsoft.com/en-us/library/aa384187.aspx"&gt;Microsoft, File System Redirector&lt;/A&gt; for further details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least that's my explanation! Hope this helps other as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John Hendrickx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Mar 2014 15:55:58 GMT</pubDate>
    <dc:creator>ckx</dc:creator>
    <dc:date>2014-03-03T15:55:58Z</dc:date>
    <item>
      <title>EG 6.1 scripting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-6-1-scripting/m-p/191954#M14654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm testing Enterprise Guide 6.1 (64-bit) at our site but ran into a really weird problem trying to run programs in batch mode. Chris Hemedinger explains how to use VBScript to do this (&lt;A href="http://blogs.sas.com/content/sasdummy/2011/05/03/using-sas-enterprise-guide-to-run-programs-in-batch/"&gt; Using SAS Enterprise Guide to run programs in batch - The SAS Dummy&lt;/A&gt;) and that worked fine using EG 4.3. Adapting the script for EG 6.1 was simple enough, just change &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;CreateObject("SASEGObjectModel.Application.4.3") to &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;CreateObject("SASEGObjectModel.Application.6.1"). The modified script worked if I ran it from a command line. Problem was, I wanted to use it in a text editor (PSPad) to run the current SAS file in batch. Using PSPad, I kept getting errors "&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Could not create object named "SASEGObjectModel.Application.6.1"". Using &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“c:\windows\system32\wscript.exe” or &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“c:\windows\sysWOW64\wscript.exe” made no difference.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;It turned out I had to use &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“C:\WINDOWS\&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt;sysnative&lt;/SPAN&gt;&lt;/SPAN&gt;\wscript.exe”. That is weird, since there is no &lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;“C:\WINDOWS\sysnative” directory.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This issue is due to the fact that PSPad is a 32-bit application but EG 6.1 is 64-bit. “%windir%\system32” on 64-bit systems is actually reserved for the 64-bit version of wscript and similar programs and dlls. “%windir%\sysWOW64” contains 32-bit versions. If a 32-bit application attempts to access “%windir%\system32”, it is redirected to “%windir%\sysWOW64”. Usually, that would be fine, but not for EG 6.1. In that case, “%windir%\sysnative” should be used. WOW64 recognises sysnative as a special alias to indicate that the file system should not redirect the access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="http://msdn.microsoft.com/en-us/library/aa384187.aspx"&gt;Microsoft, File System Redirector&lt;/A&gt; for further details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least that's my explanation! Hope this helps other as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John Hendrickx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 15:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-6-1-scripting/m-p/191954#M14654</guid>
      <dc:creator>ckx</dc:creator>
      <dc:date>2014-03-03T15:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: EG 6.1 scripting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-6-1-scripting/m-p/191955#M14655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, thanks for sharing that tip.&amp;nbsp; "Sysnative" is new to me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I'm glad you're able to use EG in your batch processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 16:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-6-1-scripting/m-p/191955#M14655</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2014-03-03T16:40:39Z</dc:date>
    </item>
  </channel>
</rss>

