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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 807 views
  • 0 likes
  • 2 in conversation