<?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 EG4 and vb/vba in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG4-and-vb-vba/m-p/5167#M1635</link>
    <description>As you probably know, you can add parameters in an EG project and associate them with your SAS programs, queries, and tasks.  Once those parameters are in place, you can use the automation interface to discover and assign values for those parameters.&lt;BR /&gt;
&lt;BR /&gt;
Here is a simple example of scripting an EG project with parameters:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Dim app&lt;BR /&gt;
Dim prjName&lt;BR /&gt;
Dim prjObject&lt;BR /&gt;
Dim parmList&lt;BR /&gt;
Dim parm&lt;BR /&gt;
&lt;BR /&gt;
prjName = "C:\temp\autowithparams.egp"    'Project Name&lt;BR /&gt;
&lt;BR /&gt;
' start the app and open the project      &lt;BR /&gt;
Set app = CreateObject("SASEGObjectModel.Application.4")&lt;BR /&gt;
Set prjObject = app.Open(prjName,"")&lt;BR /&gt;
&lt;BR /&gt;
' discover the parameters&lt;BR /&gt;
Set parmList = prjObject.Parameters&lt;BR /&gt;
Wscript.Echo "Project has " &amp;amp; parmList.Count &amp;amp; " parameters."&lt;BR /&gt;
&lt;BR /&gt;
' work with the first parameter&lt;BR /&gt;
Set parm = parmList.Item(0)&lt;BR /&gt;
WScript.Echo parm.Name &amp;amp; " parameter has default value of " &amp;amp; parm.DefaultValue&lt;BR /&gt;
parm.Value = "M"&lt;BR /&gt;
&lt;BR /&gt;
WScript.Echo parm.Name &amp;amp; " parameter has been set to value of " &amp;amp; parm.Value&lt;BR /&gt;
&lt;BR /&gt;
' run the project&lt;BR /&gt;
prjObject.Run&lt;BR /&gt;
&lt;BR /&gt;
WScript.Echo parm.Name &amp;amp; " parameter has been set after Run to value of " &amp;amp; parm.Value&lt;BR /&gt;
&lt;BR /&gt;
prjObject.Close&lt;BR /&gt;
app.Quit&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
    <pubDate>Fri, 26 Oct 2007 13:29:58 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2007-10-26T13:29:58Z</dc:date>
    <item>
      <title>SAS EG4 and vb/vba</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG4-and-vb-vba/m-p/5166#M1634</link>
      <description>Hi guys,&lt;BR /&gt;
&lt;BR /&gt;
We have some SAS EG programs that deal with data conversion/ manipulation which require some variable parameters e.g. library names and paths of input/output files. I want to create a vb/ asp front end to input these parameters and runs the EG project from this vb front end.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas how I can do this... I have researched and found some vb examples&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=3007ி" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=3007ி&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
But I don't know how sas eg takes or reads the parameters as input. Basically how do I feed these parameters/variables into SAS EG to use?&lt;BR /&gt;
&lt;BR /&gt;
Hope someone can help?</description>
      <pubDate>Tue, 23 Oct 2007 09:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG4-and-vb-vba/m-p/5166#M1634</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-23T09:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG4 and vb/vba</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG4-and-vb-vba/m-p/5167#M1635</link>
      <description>As you probably know, you can add parameters in an EG project and associate them with your SAS programs, queries, and tasks.  Once those parameters are in place, you can use the automation interface to discover and assign values for those parameters.&lt;BR /&gt;
&lt;BR /&gt;
Here is a simple example of scripting an EG project with parameters:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Dim app&lt;BR /&gt;
Dim prjName&lt;BR /&gt;
Dim prjObject&lt;BR /&gt;
Dim parmList&lt;BR /&gt;
Dim parm&lt;BR /&gt;
&lt;BR /&gt;
prjName = "C:\temp\autowithparams.egp"    'Project Name&lt;BR /&gt;
&lt;BR /&gt;
' start the app and open the project      &lt;BR /&gt;
Set app = CreateObject("SASEGObjectModel.Application.4")&lt;BR /&gt;
Set prjObject = app.Open(prjName,"")&lt;BR /&gt;
&lt;BR /&gt;
' discover the parameters&lt;BR /&gt;
Set parmList = prjObject.Parameters&lt;BR /&gt;
Wscript.Echo "Project has " &amp;amp; parmList.Count &amp;amp; " parameters."&lt;BR /&gt;
&lt;BR /&gt;
' work with the first parameter&lt;BR /&gt;
Set parm = parmList.Item(0)&lt;BR /&gt;
WScript.Echo parm.Name &amp;amp; " parameter has default value of " &amp;amp; parm.DefaultValue&lt;BR /&gt;
parm.Value = "M"&lt;BR /&gt;
&lt;BR /&gt;
WScript.Echo parm.Name &amp;amp; " parameter has been set to value of " &amp;amp; parm.Value&lt;BR /&gt;
&lt;BR /&gt;
' run the project&lt;BR /&gt;
prjObject.Run&lt;BR /&gt;
&lt;BR /&gt;
WScript.Echo parm.Name &amp;amp; " parameter has been set after Run to value of " &amp;amp; parm.Value&lt;BR /&gt;
&lt;BR /&gt;
prjObject.Close&lt;BR /&gt;
app.Quit&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Fri, 26 Oct 2007 13:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG4-and-vb-vba/m-p/5167#M1635</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2007-10-26T13:29:58Z</dc:date>
    </item>
  </channel>
</rss>

