BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hulksmash
Obsidian | Level 7

Hello,

 

I am not sure if this is possible.  I am writing procedures on a project I created in EG and I would like to output the metadata of all the prompts.  I would need things like the Prompt name, default value, displayed test, description, etc...  I have easily gotten the prompt name and default value by

  1. Creating a blank program
  2. Adding all of my EG prompts to it via the properties
  3. Running the blank program
  4. Copying the part of the log that contains the %let statements for the prompt default values

Is there a similar way to get things like the description, displayed text, prompt type, ect...?

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

You can obtain at least some of this via EG Automation.  See this article about automation in VBScript and PowerShell.

 

A prompt/param snippet for VBscript:

 

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

View solution in original post

2 REPLIES 2
andreas_lds
Jade | Level 19

Afaik there is no way to get the metadata, when the egp is loaded.

 

You could unzip the egp and extract the data from project.xml, there is a tag called <Parameters> containing the complete definition of all prompts.

ChrisHemedinger
Community Manager

You can obtain at least some of this via EG Automation.  See this article about automation in VBScript and PowerShell.

 

A prompt/param snippet for VBscript&colon;

 

' 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
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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 861 views
  • 0 likes
  • 3 in conversation