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 For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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