<?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: Automating SAS using VBScript - Exporting output of SAS Data Set in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/553564#M33555</link>
    <description>&lt;P&gt;Thanks for your kind reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to open my existing sasProgram as per your code. How can I load my .egp file and than set the variable sasProgram?&lt;/P&gt;&lt;PRE&gt;For n=0 to (sasProgram.OutputDatasets.Count -1)&lt;/PRE&gt;&lt;P&gt;Let me provide some details about my requirement in steps&lt;/P&gt;&lt;P&gt;Requirement: To execute an existing process flow and save its output through automation script&lt;/P&gt;&lt;P&gt;Steps to follow&lt;/P&gt;&lt;P&gt;1- Open .egp file&lt;/P&gt;&lt;P&gt;2- Click on Run Process Flow&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; a) Loads data from CSV (Import Data) and create DataSet&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; b) Perform one or more transformation on DataSet and generate result/final DataSet&lt;/P&gt;&lt;P&gt;3- Save the output tables data result/final (Sas Dataset) via export (or anything) on the disc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program you are referring to, I have reviewed them. The&amp;nbsp;&lt;A href="https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/BatchProject.vbs" target="_self"&gt;BatchProject.vbs example&lt;/A&gt;&amp;nbsp;does not open a project/sasProject&lt;/P&gt;&lt;P&gt;And,&amp;nbsp;&lt;A href="https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/ExtractCode.vbs" target="_self"&gt;ExtractCode.vbs example&lt;/A&gt;&amp;nbsp;does not execute the processflow and does not save the output of executed process flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 09:21:31 GMT</pubDate>
    <dc:creator>Ejaz</dc:creator>
    <dc:date>2019-04-24T09:21:31Z</dc:date>
    <item>
      <title>Automating SAS using VBScript - Exporting output of SAS Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/551958#M33500</link>
      <description>&lt;P&gt;In my process flow in SAS EG, I am importing a CSV --&amp;gt; Filter the data through Query Builder --&amp;gt; Output in SAS Data Set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My agenda is to run it through .vbs as per mentioned in the post&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Doing-More-with-SAS-Enterprise-Guide-Automation/ta-p/417832" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Doing-More-with-SAS-Enterprise-Guide-Automation/ta-p/417832&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After running it, I want to export data in SAS Data Set to my destination folder (without using a program)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The example in above post do not execute/run the process flow and export the output in the folder.&lt;/P&gt;&lt;P&gt;Any helps please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more thing, can I run SAS EG process flow through CLI in Windows?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 01:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/551958#M33500</guid>
      <dc:creator>Ejaz</dc:creator>
      <dc:date>2019-04-18T01:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS using VBScript - Exporting output of SAS Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/552300#M33516</link>
      <description>&lt;P&gt;Adapting the &lt;A href="https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/BatchProject.vbs" target="_self"&gt;BatchProject.vbs example&lt;/A&gt;, you should be able to do something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;For n=0 to (sasProgram.OutputDatasets.Count -1)
  Dim dataName
  dataName = sasProgram.OutputDatasets.Item(n).Name
  sasProgram.OutputDatasets.Item(n).SaveAs _
    getCurrentDirectory &amp;amp; "\" &amp;amp; dataName &amp;amp; ".sas7bdat"
Next&lt;/PRE&gt;
&lt;P&gt;And using script, you can also run individual process flows -- by name.&amp;nbsp; See how to address Flows in &lt;A href="https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/ExtractCode.vbs" target="_self"&gt;the ExtractCode.vbs example&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 19:32:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/552300#M33516</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2019-04-18T19:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS using VBScript - Exporting output of SAS Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/553564#M33555</link>
      <description>&lt;P&gt;Thanks for your kind reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to open my existing sasProgram as per your code. How can I load my .egp file and than set the variable sasProgram?&lt;/P&gt;&lt;PRE&gt;For n=0 to (sasProgram.OutputDatasets.Count -1)&lt;/PRE&gt;&lt;P&gt;Let me provide some details about my requirement in steps&lt;/P&gt;&lt;P&gt;Requirement: To execute an existing process flow and save its output through automation script&lt;/P&gt;&lt;P&gt;Steps to follow&lt;/P&gt;&lt;P&gt;1- Open .egp file&lt;/P&gt;&lt;P&gt;2- Click on Run Process Flow&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; a) Loads data from CSV (Import Data) and create DataSet&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; b) Perform one or more transformation on DataSet and generate result/final DataSet&lt;/P&gt;&lt;P&gt;3- Save the output tables data result/final (Sas Dataset) via export (or anything) on the disc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program you are referring to, I have reviewed them. The&amp;nbsp;&lt;A href="https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/BatchProject.vbs" target="_self"&gt;BatchProject.vbs example&lt;/A&gt;&amp;nbsp;does not open a project/sasProject&lt;/P&gt;&lt;P&gt;And,&amp;nbsp;&lt;A href="https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/ExtractCode.vbs" target="_self"&gt;ExtractCode.vbs example&lt;/A&gt;&amp;nbsp;does not execute the processflow and does not save the output of executed process flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Automating-SAS-using-VBScript-Exporting-output-of-SAS-Data-Set/m-p/553564#M33555</guid>
      <dc:creator>Ejaz</dc:creator>
      <dc:date>2019-04-24T09:21:31Z</dc:date>
    </item>
  </channel>
</rss>

