For example, i have a macro program
%macro test(parameter1= , parameter2=, parameter3=);
DATA data_gender;
SET data_input(WHERE=(gender=parameter3));
Agree with Joe's answer. One good point they make in the paper is they are testing for blank, and their test will return true whether a parameter is null or has blanks in it. Sometimes it is useful have a test that differentiates between a parameter that is null and one that has blanks. The paper mentions %length(%superq( ))
as a possible test for null. For example below, this allows you to specify a blank value for sex, and get a different result than you do when sex is null.
data class;
set sashelp.class;
if _n_=1 then sex='';
run;
%macro test2(parameter1= , parameter2=, sex=);
DATA data_gender;
SET class(
%if %length(%superq(sex)) %then %do;
where=(sex="&sex.")
%end;
);
RUN;
%mend;
%test2(sex=)
%test2(sex=%str( ))