BookmarkSubscribeRSS Feed
Jay
Calcite | Level 5 Jay
Calcite | Level 5
The first step of a project is to subset the data using the query builder and a macro variable (term_code_key) built using the prompt manage. The macro resolves in the query builder and works fine.

In subsequent programs I wanted to use the macro to label the output data i.e.
Title1 "&term_code_key";

however this returns a warning: Apparent symbolic reference TERM_CODE_KEY not resolved.

How do you, or can you, use a macro created in the prompt manager in subsequent code with out prompting for the same information again?

I did note in the log of the original query this tell tale note: %SYMDEL Term_code_Key;
6 REPLIES 6
Patrick
Opal | Level 21
Is this EG 4.1 or 4.2 (SAS 9.1 or 9,2)?

For EG 4.2:
I've seen the %symdel in the log as well and couldn't find a way to prevent EG to add this deletion of the macro var.

The "work around" which worked:
- Add a program node before your query.
- Add the prompt to the program node (I called it "Test").
- Create in the program node code like: %let retainTest=&Test;
- In the Query builder use &retainTest (not as prompt value) instead of &Test

HTH
Patrick
Jay
Calcite | Level 5 Jay
Calcite | Level 5
It is EG 4.2

The problem with the "work-around" is that it removes the "interactive" nature of using the prompt....

But, I haven't found any solution either...
RichardH_sas
SAS Employee
Check out the following note about the problem:

http://support.sas.com/kb/36/020.html

As it mentions, the workaround is to right-click on each task/code you want to use the prompt, select Properties, then manually add the prompt in the prompt pane.

I believe the next version of EG will let you choose whether those %symdel statements get generated. Turning them off is a pretty common request in EG 4.2.
Jay
Calcite | Level 5 Jay
Calcite | Level 5
That works - Thanks Richard !
Patrick
Opal | Level 21
I don't get it!
Is the user now prompted several times for the same value?
Jay
Calcite | Level 5 Jay
Calcite | Level 5
It depends....
The results of some quick testing, after setting up the prompts the way Richard described, this is what I saw:

1) If it's run from an ordered list or the top of the process flow: I was prompted once for the macros (there were three in this project) at the very start and the macros were used and resolved in all of the other nodes without further prompts.

2) If I ran the project "node by node" manually, it will put a prompt up in every node that uses one of the macros.

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