<?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: pass a parameter to SAS EG project. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75753#M7544</link>
    <description>hey Chris,&lt;BR /&gt;
&lt;BR /&gt;
I will definitely try this. &lt;BR /&gt;
I had previously tried written below,but some thing went wrong.&lt;BR /&gt;
&lt;BR /&gt;
prjObject.code mycode = prjObject.codeCollection.add;&lt;BR /&gt;
mycode = "%Let mypath=%str(D:\SAS\INputfiles)"&lt;BR /&gt;
mycode.run&lt;BR /&gt;
&lt;BR /&gt;
i will let you know the results ..thanks.&lt;BR /&gt;
&lt;BR /&gt;
regards&lt;BR /&gt;
Avi</description>
    <pubDate>Mon, 09 Mar 2009 07:16:37 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-03-09T07:16:37Z</dc:date>
    <item>
      <title>pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75742#M7533</link>
      <description>Hi friends, &lt;BR /&gt;
I have schedule a SAS EG project . It created a EGScript.vbs file for me to run the project.&lt;BR /&gt;
I want to know that how can i pass a parameter (eg. say a path of a input file which will be required somewhere in project code). I need to give this EGScript.vbs file to a guy who just need to change the path as per his requirement. &lt;BR /&gt;
can someone help.  &lt;BR /&gt;
Thank You</description>
      <pubDate>Fri, 27 Feb 2009 09:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75742#M7533</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-27T09:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75743#M7534</link>
      <description>hey ...if any body knows..... then plssssssss let me know...&lt;BR /&gt;
tell me if there is some other way of doing it....

Message was edited by: Avi</description>
      <pubDate>Mon, 02 Mar 2009 07:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75743#M7534</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-02T07:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75744#M7535</link>
      <description>When launching SAS, it is possible to pass a SYSPARM=  parameter -- I suggest you explore how you can introduce this parameter into your vbs script as a command invocation parameter, then your SAS program can reference either the automatic macro variable named &amp;amp;SYSPARM, or you can retrieve the SYSPARM=  character string using the SYSPARM() function.&lt;BR /&gt;
&lt;BR /&gt;
The SAS DOC has information about SYSPARM.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 02 Mar 2009 17:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75744#M7535</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-02T17:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75745#M7536</link>
      <description>Hi Avi,&lt;BR /&gt;
&lt;BR /&gt;
I haven't done much with scheduling, but my guess is you're probably going to need to use a %LET statement to assign the path value. Anyone with better ideas please jump in!&lt;BR /&gt;
&lt;BR /&gt;
So, if the parameter name is PATH1, I would create a Code Node at the top of your project with the code:&lt;BR /&gt;
&lt;BR /&gt;
%LET path1=c:\whatever;&lt;BR /&gt;
&lt;BR /&gt;
The person you're giving the project to will have to modify this code by hand to the appropriate path. Verify in the code/task that's using the path that there are double quotes to get the macro variable to resolve correctly.&lt;BR /&gt;
&lt;BR /&gt;
RIGHT: "&amp;amp;path1\textfile.dat"&lt;BR /&gt;
WRONG: '&amp;amp;path1\textfile.dat'&lt;BR /&gt;
&lt;BR /&gt;
To be on the safe side, once you have the %LET in the project I'd then delete the parameter from the parameters manager. My guess is that EG would just sit there waiting for the user to type the parameter value if one is still in the project, but again, haven't tried this. Before you delete the parameter from the Parameters Manager, make sure you have a backup of the project in case my instructions are totally off-base!!&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps.</description>
      <pubDate>Tue, 03 Mar 2009 14:13:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75745#M7536</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2009-03-03T14:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75746#M7537</link>
      <description>Hi &lt;BR /&gt;
Thank you for the replies. &lt;BR /&gt;
I tried giving some code in the EGscript.vbs like&lt;BR /&gt;
&lt;BR /&gt;
project.run&lt;BR /&gt;
project.submit("%let Mpath =%str(D:\SAS\InputFiles);") &lt;BR /&gt;
&lt;BR /&gt;
This statement creates a Macro variable   Mpath which can be resovled any where in  project. this macro may be SYSparam also. but&lt;BR /&gt;
which i hoped it will run as the first code in the project. But it not seems to be working. this code never runs ..... i checked logs&lt;BR /&gt;
see the guy to which has nothing to do with sas ...My project creates few report based on a input file.  the problem is the path to input file cannot be fixed... i have to give the only vbs script  to him , and running the script runs the project on server .. and stores the o/p in a folder. so he needs to only modify the path when required in vbs script.</description>
      <pubDate>Tue, 03 Mar 2009 15:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75746#M7537</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-03T15:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75747#M7538</link>
      <description>Avi,&lt;BR /&gt;
&lt;BR /&gt;
Are you using the path to point to raw data files (aka flat files), or SAS data sets, or something else entirely? I've got some ideas but wanted to ask that up front.</description>
      <pubDate>Tue, 03 Mar 2009 21:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75747#M7538</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2009-03-03T21:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75748#M7539</link>
      <description>ya , i am using the path to point a rawdata file which is a CSV file.</description>
      <pubDate>Wed, 04 Mar 2009 04:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75748#M7539</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-04T04:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75749#M7540</link>
      <description>The presumption here is that you need the variable data in your SAS environment.  So, you need to determine how/where SAS is being invoked and introduce a SAS run-time CONFIG parameter override, either using SYSPARM=  or you can use the IS= (short for INITSTMT= ) where you can supply directly your %LET statement.  If you choose SYSPARM, then you can access the string using the SAS automatic variable &amp;amp;SYSPARM, or by using the SAS function SYSPARM() to assign a DATA step variable, as needed, in your application program.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 04 Mar 2009 18:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75749#M7540</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-04T18:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75750#M7541</link>
      <description>I think you may be trying to do too much in the VB script and not enough in the project itself. I'm looking at a sample VB script that EG generated for scheduling, and I don't see anything in there that would allow you to set a value for a path. The relevant VB code seems to be:&lt;BR /&gt;
&lt;BR /&gt;
    ' Start up Enterprise Guide using the project name&lt;BR /&gt;
    '----&lt;BR /&gt;
    Dim prjName&lt;BR /&gt;
    Dim prjObject&lt;BR /&gt;
&lt;BR /&gt;
    prjName = "C:\workshop\winsas\egqr4\DemoData\Demo.egp"    'Project Name&lt;BR /&gt;
      &lt;BR /&gt;
    Set app = CreateObject("SASEGObjectModel.Application.4")&lt;BR /&gt;
    If Checkerror("CreateObject") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    '-----&lt;BR /&gt;
    ' open the project&lt;BR /&gt;
    '-----&lt;BR /&gt;
    Set prjObject = app.Open(prjName,"")&lt;BR /&gt;
    If Checkerror("app.Open") = True Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
You could explore whether using SYSPARM would allow you to supply the path to EG, as Scott suggests. I don't have much experience with that, but know SYSPARM is designed for situations like this.&lt;BR /&gt;
&lt;BR /&gt;
Me personally, I would modify the part of the project that's reading the CSV file. Take the code generated by the import data task, copy it, and paste it into a new code node. Add a %let at the top of that code to store the path. Reference that macro variable on the infile statement (as previously posted). Lastly, get rid of the original import data task and any stuff in the parameters manager since the code node is going to handle that part. The end user will have to change the code in the project to meet their needs -- so you'll need to share the project AND the VB script. This may be what you were hoping to avoid... but this is the way I know how to do it. If you get desperate, remember you can say File &amp;gt; Export &amp;gt; Export All Code. This has it's own problems, but it's a good technique to know about.&lt;BR /&gt;
&lt;BR /&gt;
So, hope you can get this working! I'm sorry I can't be more help on the VB stuff; I get lost once I start venturing outside SAS. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 04 Mar 2009 20:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75750#M7541</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2009-03-04T20:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75751#M7542</link>
      <description>The EG automation model allows you to access and set values for project parameters -- those parameters that you've defined with the Tools-&amp;gt;Parameter Manager.&lt;BR /&gt;
&lt;BR /&gt;
Here is an example VB script that works with parameters that you've defined in your project.&lt;BR /&gt;
&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>Thu, 05 Mar 2009 12:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75751#M7542</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2009-03-05T12:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75752#M7543</link>
      <description>Chris' answer was definitely better than mine. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Use that!</description>
      <pubDate>Fri, 06 Mar 2009 21:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75752#M7543</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2009-03-06T21:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75753#M7544</link>
      <description>hey Chris,&lt;BR /&gt;
&lt;BR /&gt;
I will definitely try this. &lt;BR /&gt;
I had previously tried written below,but some thing went wrong.&lt;BR /&gt;
&lt;BR /&gt;
prjObject.code mycode = prjObject.codeCollection.add;&lt;BR /&gt;
mycode = "%Let mypath=%str(D:\SAS\INputfiles)"&lt;BR /&gt;
mycode.run&lt;BR /&gt;
&lt;BR /&gt;
i will let you know the results ..thanks.&lt;BR /&gt;
&lt;BR /&gt;
regards&lt;BR /&gt;
Avi</description>
      <pubDate>Mon, 09 Mar 2009 07:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75753#M7544</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-09T07:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75754#M7545</link>
      <description>Hi chris ...&lt;BR /&gt;
&lt;BR /&gt;
Thank you very much . The solution you gave was perfect. It worked fine.&lt;BR /&gt;
&lt;BR /&gt;
Avi</description>
      <pubDate>Mon, 09 Mar 2009 10:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75754#M7545</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-09T10:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75755#M7546</link>
      <description>@Chris,&lt;BR /&gt;
&lt;BR /&gt;
The code example you provided allows for a parameter's value to be set using its numerical index, but is there a method that allows it to be set by name?&lt;BR /&gt;
&lt;BR /&gt;
The only method I've found, which seems a strange approach, is to parse the list of parameters until I match the required name and then set the value.  This doesn't seem like the best approach, but I've been unable to find any other way to access a specific parameter.</description>
      <pubDate>Mon, 10 Aug 2009 11:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75755#M7546</guid>
      <dc:creator>DF</dc:creator>
      <dc:date>2009-08-10T11:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75756#M7547</link>
      <description>DF,&lt;BR /&gt;
&lt;BR /&gt;
No, I don't think there is a better approach right now when using VBScript to automate it.  I admit it's a bit klunky...&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Tue, 11 Aug 2009 14:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75756#M7547</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2009-08-11T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75757#M7548</link>
      <description>Thanks for clarifying that Chris - I can stop looking now!</description>
      <pubDate>Tue, 11 Aug 2009 14:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75757#M7548</guid>
      <dc:creator>DF</dc:creator>
      <dc:date>2009-08-11T14:27:08Z</dc:date>
    </item>
    <item>
      <title>pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75758#M7549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris - &lt;/P&gt;&lt;P&gt;I am trying to pass a parameter from a vbs/wsf code into a SAS Project. I am using your approach but am not having success. (I am using EG 4.3, which points to a SAS Server running 9.2). In essence, while it looks like the vbs object gets the correct variable values set, (and even indicates that the default values for each parameter are correctly set and extracted), the parameter values do not seem to exist when the SAS project starts to execute. Sorry in advance for writing so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. in my sas project, i have added three variables using the Prompt Manager window. They are filepath, lastmoddate, lastmodtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. in my vbs code, i have &lt;/P&gt;&lt;P&gt;a)the code:&lt;/P&gt;&lt;P&gt;=========&lt;/P&gt;&lt;P&gt;' Declare SAS object/Variables&lt;/P&gt;&lt;P&gt;Dim oSASApp&lt;/P&gt;&lt;P&gt;Dim oSASProj&lt;/P&gt;&lt;P&gt;Dim oParmCollection&lt;/P&gt;&lt;P&gt;Dim oParm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sSasP ' Path to SAS code&lt;/P&gt;&lt;P&gt;dim sSasF ' Filename of SAS code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim filepath&lt;/P&gt;&lt;P&gt;dim moddate&lt;/P&gt;&lt;P&gt;dim modtime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sSasF = "*****************\shell_of_ice.egp" 'Does not end w/.egp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; moddate = "09/09/9999"&lt;/P&gt;&lt;P&gt;&amp;nbsp; modtime = "09:09:09"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WScript.Echo moddate &amp;amp; " " &amp;amp; modtime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ' start the sas app and open the project&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Set oSASApp = CreateObject("SASEGObjectModel.Application.4.3")&lt;/P&gt;&lt;P&gt;WScript.Echo "sasapp setup"&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set oSASProj = oSASApp.Open(sSasF,"")&lt;/P&gt;&lt;P&gt;WScript.Echo "I have setup sas proj."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ' Discover parameters Within the opened SAS project which are already defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set oParmCollection = oSASProj.Parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ' pass values to those parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp; dim p&lt;/P&gt;&lt;P&gt;&amp;nbsp; for p = 0 to oParmCollection.Count - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oParm = oParmCollection.Item(p)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo oParm.Name &amp;amp; " parameter has default value of " &amp;amp; oParm.DefaultValue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if oParm.Name = "lastmoddate" then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oParm.Value = moddate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseIf oParm.Name = "lastmodtime" then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oParm.Value = modtime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else 'filepath&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oParm.Value = filepath&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp; next 'p&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ' run the project&lt;/P&gt;&lt;P&gt;msgbox "about to run project"&lt;/P&gt;&lt;P&gt;&amp;nbsp; oSASProj.Run&lt;/P&gt;&lt;P&gt;msgbox "ran project"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b)the output from vbs:&lt;/P&gt;&lt;P&gt;==================&lt;/P&gt;&lt;P&gt;I have setup sas proj.&lt;/P&gt;&lt;P&gt;filepath parameter has default value of **************\poweractivity_2011_12_22.csv&lt;/P&gt;&lt;P&gt;lastmoddate parameter has default value of 01/01/01&lt;/P&gt;&lt;P&gt;lastmodtime parameter has default value of 01:01:01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. below is the log from the SAS project executing - please note, i have used %put statements at the beginning of my SAS Program and also at the end. I am getting the following errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;filepath;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference FILEPATH not resolved.&lt;/P&gt;&lt;P&gt;&amp;amp;filepath&lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;lastmoddate;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference LASTMODDATE not resolved.&lt;/P&gt;&lt;P&gt;&amp;amp;lastmoddate&lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;lastmodtime;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference LASTMODTIME not resolved.&lt;/P&gt;&lt;P&gt;&amp;amp;lastmodtime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 03:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75758#M7549</guid>
      <dc:creator>nrabonik</dc:creator>
      <dc:date>2011-12-24T03:27:15Z</dc:date>
    </item>
    <item>
      <title>pass a parameter to SAS EG project.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75759#M7550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok i resolved the issue!! and will leave the post up in case it will be of help to others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while i already defined the different parameters, i did not attach them to a particular program in the project. to do this, right click the program in the Process Flow view, and select Properties, and then Prompts. Then, one by one, associate each prompt parameter to the desired program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steep learning curve, for sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 03:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/pass-a-parameter-to-SAS-EG-project/m-p/75759#M7550</guid>
      <dc:creator>nrabonik</dc:creator>
      <dc:date>2011-12-24T03:53:59Z</dc:date>
    </item>
  </channel>
</rss>

