Hi, Cheri:
Here's the deal. When EG builds that parameter list, it allows you to have a 'blank' -- inside EG -- as a possible parameter choice.
However, when EG goes to create a stored process for you and builds the parameter value choices, it does look like you have a user-defined format in place, because otherwise, you would see just the number in both "Display As" and "Resolves To". EG is either putting NO DEPARTMENT into the stored process parameter choice values based on your user defined format -- or is doing it because it does not allow a "blank" character as a choice -- which I can understand. Passing a quoted string or a blank requires that the character be "protected" and protecting a quote or a space for transmission involves some advanced macro programming that is not easily understandable.
But, to deal with the fact that EG put "NO DEPARTMENT" (perhaps based on your user-defined format), you can CHANGE the stored process code for your test. Something like this:
[pre]
%macro testdnum;
%if &DeptNUM = NO DEPARTMENT %then %do;
proc print data=deptdata;
title "No Where clause -- get all departments";
run;
%end;
%else %if &DeptNUM ne NO DEPARTMENT %then %do;
proc print data=deptdata;
where deptnum = &DeptNum;
/* OR where deptnum = "&DeptNUM"; if the deptnum is character */
title "With Where clause -- get only department &deptnum";
run;
%end;
%mend testdnum;
[/pre]
Of course, EG will have put a LOT more code into the stored process. So before you take this approach, you might actually want to contact Tech Support for more help. Changing the code generated by EG can be tricky, because to use Macro conditional logic (%IF), you need to have a macro program (what's defined by the %MACRO and %MEND).
You must already have some logic in place in the EG project for what happened when they picked a space. There are other ways to deal with this than the method I suggest. However, I think that your best bet for a correct answer -- given your data and your parameters and the amount of code you want to conditionally execute -- is to contact Tech Support for help.
To contact Tech Support, go to:
http://support.sas.com and on the left hand side, look for the link called "Submit a Problem".
cynthia