DATA Step, Macro, Functions and more

Use prompts defined in a SAS Stored Process to define macro variables in EG programs

Reply
Frequent Contributor
Posts: 76

Use prompts defined in a SAS Stored Process to define macro variables in EG programs

I wish to have cascading prompts within Enterprise Guide so I created a stored process (named Select Report Institute) and added it as a task to my EG project.

 

Capture1.PNG

 

The prompts cascade as required and the log shows that the macro variables have been assigned correctly.

 

However, the macro variables are not assigned when I attempt to use them from a separate program (e,g, Initialise Values) within the EG project.

 

Additional information:

Stored Process prompts - I have tried accessing both the input prompts and output parameters within Initialise Values

 

Stored Process SAS code

 

 %global in_selected_institutes in_this_university selected_institutes this_university;
*ProcessBody;

%stpbegin;
%let selected_institutes = &in_selected_institutes;
%let this_university = &in_this_university;

%put &selected_institutes;
%put &in_selected_institutes;
%stpend;

Output form Stored Process Code:

 

 

43 %stpbegin;
44 %let selected_institutes = &in_selected_institutes;
45 %let this_university = &in_this_university;
46
47 %put &selected_institutes;
Bond University
48 %put &in_selected_institutes;
Bond University
49 %stpend;

 

 

Output from Initialise Values program

 

WARNING: Apparent symbolic reference SELECTED_INSTITUTES not resolved.
26         
27         %put &selected_institutes;
&selected_institutes
28         %put &in_selected_institutes;
WARNING: Apparent symbolic reference IN_SELECTED_INSTITUTES not resolved.
&in_selected_institutes

 

Any advice on how to use cascading prompts to define macro variables within SAS EG will be much appreciated.

 

Thanks,

Marie

 

Ask a Question
Discussion stats
  • 0 replies
  • 140 views
  • 0 likes
  • 1 in conversation