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

Hi all,

I have a SAS EG project where some of parameteres are defined through the prompt mask. So, if starting this project the user have to select values for these parameters, using the prompt mask. What I want is to save the selected prompt values in some file (text, html, SAS - this does'n matter) at the end of the process, so that the user would be able to see afterwards, which values he(she) selected for this particular run. Is there some easy possibility to do this?

Thanks in advance,

Denis

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

When you define the prompt, be sure to check the box "Use prompt value throughout project".  See the screenshot:

saveprompt.png

Otherwise the prompt mechanism will clear the macro variables (like a good macro citizen...)

Chris

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

6 REPLIES 6
Reeza
Super User

The prompts are stored as macro variables, so you can create a data set that contains the values and then save them out however you wish.

ie prompts = date_start date_end time_period

Data Save_Prompts;

Prompt="Date Start";

Value="&date_Start";

output;

Prompt="Date End";

Value = "&date_end";

output;

Prompt = "Time Period";

Value="Monthly";

output;

run;

DrBoogie
Obsidian | Level 7

Thank you, but this approach doesn't work, I attempted it already. I obtain the note "Apparent symbolic reference ... not resolved". It seems that the macro variables from prompts are not global, so they are not available at the end of the process. And since I use wizard-generated queries and not programs in my process I don't know how I can declare these macro variables as global. :smileycry:

Quentin
Super User

Suggest you add:

%put _user_ ;

and take a look at the log.  It should list all of the user-defined macro vaiables, and the prompts should be there.  I'm pretty sure they are global macro variables.  But I suppose it's possible that EG is deleting them for you at some point.  So you might try adding %put _user_; at multiple points in your project.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Reeza
Super User

So put that step into the process somewhere. Best way to do it anyways.

Make sure to use double quotes to get the variables to resolve.

ChrisHemedinger
Community Manager

When you define the prompt, be sure to check the box "Use prompt value throughout project".  See the screenshot:

saveprompt.png

Otherwise the prompt mechanism will clear the macro variables (like a good macro citizen...)

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
DrBoogie
Obsidian | Level 7

Thank You, this is exactly what I looked for Smiley Happy

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
  • 6 replies
  • 4894 views
  • 8 likes
  • 4 in conversation