<?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 EG Scripting (VB.NET): Importing data sets and running code on this does not work in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301045#M20465</link>
    <description>&lt;P&gt;I don't speak VB.net but the third snippet of code does not appear to reference a SAS data set. Is the result perhaps SAS Log items or proc output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the TEST.egp have a hard coded reference to read a specific XLSX file? If so I would examine the log for that bit way before the Proc SQL you show.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2016 15:11:03 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-09-27T15:11:03Z</dc:date>
    <item>
      <title>SAS EG Scripting (VB.NET): Importing data sets and running code on this does not work</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301025#M20464</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a little VB.NET program&amp;nbsp;to automate some stuff we are doing on a regular basis with SAS EG 5.1. The SAS EG projects contains a process flow that first imports an excel xlsx file into the WORK library and then I run some SAS code on this file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The VB.NET code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim app As SAS.EG.Scripting.Application
Dim prjObject As SAS.EG.Scripting.Project

app = New SAS.EG.Scripting.Application()
prjObject = app.Open("Test.egp", "")
prjObject.Run()&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;When I look into the log file of the code I run in the debugger (prjObject.ContainerCollection.Item("Prozessfluss").Items(2).Log.Text) I find the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[...]
41 proc sql;
42 select *
43 from work.test
44 ;
ERROR: File WORK.TEST.DATA does not exist.
[...]&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But I can export the file with the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim file As SAS.EG.Scripting.File = &lt;SPAN&gt;prjObject.&lt;/SPAN&gt;&lt;SPAN&gt;ContainerCollection.Item("Process Flow")&lt;/SPAN&gt;&lt;SPAN&gt;.Items("&lt;/SPAN&gt;&lt;SPAN&gt;Test&lt;/SPAN&gt;&lt;SPAN&gt;.xlsx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;file.Tasks(0).Run()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;file.Tasks(0).OutputDatasets(0).SaveAs("C:\temp\test.html")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;What's going on here?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301025#M20464</guid>
      <dc:creator>mbunse</dc:creator>
      <dc:date>2016-09-27T14:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG Scripting (VB.NET): Importing data sets and running code on this does not work</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301045#M20465</link>
      <description>&lt;P&gt;I don't speak VB.net but the third snippet of code does not appear to reference a SAS data set. Is the result perhaps SAS Log items or proc output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the TEST.egp have a hard coded reference to read a specific XLSX file? If so I would examine the log for that bit way before the Proc SQL you show.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 15:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301045#M20465</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-27T15:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG Scripting (VB.NET): Importing data sets and running code on this does not work</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301067#M20467</link>
      <description>&lt;P&gt;It looks like the Project.Run() isn't executing the Import Data task&amp;nbsp;-- or the task is creating WORK data in a session that's different than the next step uses. &amp;nbsp;Are you running in a SAS Grid Computing environment, where you might need to target a shared WORK location or permanent library for the data that you import?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 16:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301067#M20467</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-09-27T16:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG Scripting (VB.NET): Importing data sets and running code on this does not work</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301457#M20483</link>
      <description>&lt;P&gt;No, we ar not running a SAS Grid Computing environment. My solution now is, thanks for your suggestion, to import the file to a permanent library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks everyone for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 07:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Scripting-VB-NET-Importing-data-sets-and-running-code-on/m-p/301457#M20483</guid>
      <dc:creator>mbunse</dc:creator>
      <dc:date>2016-09-29T07:52:48Z</dc:date>
    </item>
  </channel>
</rss>

