In SAS DIS I have set date parameters on a job. I tried setting the default values using the drop down menu provided, but each time I get the error
Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.
I therefore decided to try to check if the parameter is null before proceeding, but none of my various attempts succeeded. Is there a way to do this with user-written code? Something like
if(&date_param = .) then do;
date = today();
else do;
date = &date_param;
end;
I tried this within a macro and it did not work.
Much Gratitude.
Assuming this is similar to a standard SAS macro variable, a couple of things.
First off, a null parameter would be literally blank, not a period (that's for numeric dataset variables). In a data step you could check it like so:
Second, depending on context you may need to do this in macro syntax. If you're setting another parameter, you may need to do:
%sysfunc
lets you execute a data step function in macro code.