Desktop productivity for business analysts and programmers

Resolving a Macro Created by Prompt Manger in later programs

Reply
Contributor Jay
Contributor
Posts: 24

Resolving a Macro Created by Prompt Manger in later programs

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;
Respected Advisor
Posts: 4,135

Re: Resolving a Macro Created by Prompt Manger in later programs

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
Contributor Jay
Contributor
Posts: 24

Re: Resolving a Macro Created by Prompt Manger in later programs

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...
SAS Employee
Posts: 149

Re: Resolving a Macro Created by Prompt Manger in later programs

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.
Contributor Jay
Contributor
Posts: 24

Re: Resolving a Macro Created by Prompt Manger in later programs

That works - Thanks Richard !
Respected Advisor
Posts: 4,135

Re: Resolving a Macro Created by Prompt Manger in later programs

I don't get it!
Is the user now prompted several times for the same value?
Contributor Jay
Contributor
Posts: 24

Re: Resolving a Macro Created by Prompt Manger in later programs

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.
Ask a Question
Discussion stats
  • 6 replies
  • 206 views
  • 0 likes
  • 3 in conversation