BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi guys,

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.

Any ideas how I can do this... I have researched and found some vb examples

http://support.sas.com/forums/thread.jspa?messageID=3007ி

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?

Hope someone can help?
1 REPLY 1
ChrisHemedinger
Community Manager
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.

Here is a simple example of scripting an EG project with parameters:
[pre]
Option Explicit
Dim app
Dim prjName
Dim prjObject
Dim parmList
Dim parm

prjName = "C:\temp\autowithparams.egp" 'Project Name

' start the app and open the project
Set app = CreateObject("SASEGObjectModel.Application.4")
Set prjObject = app.Open(prjName,"")

' discover the parameters
Set parmList = prjObject.Parameters
Wscript.Echo "Project has " & parmList.Count & " parameters."

' work with the first parameter
Set parm = parmList.Item(0)
WScript.Echo parm.Name & " parameter has default value of " & parm.DefaultValue
parm.Value = "M"

WScript.Echo parm.Name & " parameter has been set to value of " & parm.Value

' run the project
prjObject.Run

WScript.Echo parm.Name & " parameter has been set after Run to value of " & parm.Value

prjObject.Close
app.Quit
[/pre]

Chris
SAS Innovate 2025: Call for Content! Submit your proposals before Sept 16. Accepted presenters get amazing perks to attend the conference!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 895 views
  • 0 likes
  • 2 in conversation