Is there any SAS Usage note regarding this? My client is facing a similar issue.
is it a dynamic prompt using a dataset as input (9.2 and later)?
In that case there are undocumented requirements possible indicating a design/coding error by SAS institute.
Hi, Jaap
The same error occured in my EG project that have a dynamic prompt using a dataset. (EG 6.1)
Where can I get the undocumented requirements that you mentioned?
Or should I ask tech support?
Thanks inadvance.
Shen
You should surely contact TS for that.
The directio I am aiming at is that conditional prompts dynamic prompts are processed before your process has been started. Not necessary sharing the same Sas session or even not necessary sharing the same app server.
When that is the real root cause that is a sas design and sas implemtation error. The common behavior of SAS TS is avoiding that kind of internal Sas trouble and going for bypasses instead.
So be sure on what you requirements are and implementation is.
Thanks, Jaap
I'll contact TS for that.
I had a similar issue and developed a workaround.
*Make certain that your code contains the following *ProcessBody; %stpbegin; %stpend; statements in the right places.
*Make certain that your code defines all macro variables as global. This works best for me if I place the %global before the *ProcessBody;.
*Have a general understanding of the macro %_eg_WhereParam
*If your macro variable can contain many values, be sure to understand the macroname0, macroname and ¯oname_count macro variables. My macro variable is named brand. The Stored Process prompt returned the macro variables "brand", "brand0" and "brand_count". The number of brand variables I found are brand1 to brand&brand_count.
%macro bildin(bran=&brand.);
%let sp = ,;
%if %sysevalf(&brand_count) = %sysevalf(1) %then %do;
%let brandlst = "&bran.";
%end;
%else %do;
%let brandlst =;
%do k = 1 %to %sysevalf(&brand_count.);
%if &k. = 1 %then %let brandlst = %quote("&&brand&k.");
%else %let brandlst = %qsysfunc(catx(%quote(&sp.),&brandlst.,%QUOTE("&&brand&k.")));
%end;
%if k = %sysevalf(&brand_count.) %then %do;
%let brandlst = %quote(&brandlst.);
%end;
%end;
%mend bildin;
%bildin;
I used the &brandlist macro this way.
WHERE t1.BRAND NOT IS MISSING
AND t1.BRAND IN
(
%UNQUOTE(&BRANDLST.)
)
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.