Hi:
You should NOT need to have a dot where you show it, although in my test, the dot doesn't break the code. Basically a dot is one way to tell the Macro processor that the end of a macro variable has been reached. So, for example, if I want to concatenate 2 macro variables:
[pre]
%let first = year;
%let second=2007;
%let both = &first.&second;
%put BOTH together is: &both;
[/pre]
Then the dot between the 2 macro variables tells the macro processor to only resolve &first -- because the dot signals the end of the macro variable name. If you needed a dot in a name (as in a data set reference), then you might do this:
[pre]
%let lib = sasuser;
%let table=class;
%let myfile1 = &lib.&table;
%let myfile2= &lib..&table;
proc print data=&myfile1; title 'wrong'; run;
proc print data=&myfile2; title 'right'; run;
[/pre]
Note the use of 2 dots in the %LET statement for &myfile2. The first proc print will get an error message, but the second proc print will work. The Macro facility has some rules that it follows when it's scanning and resolving macro variable references and if you're interested in reading about those rules, search in the SAS documentation for the topics:
"Using Macro Variables" and
"Referencing Macro Variables Indirectly".
In your case, the " after &theDate -- "&thedate"d should be OK to act as token that ends the macro variable. If you are getting this message:
[pre]
Beginning in SAS 9, users may receive the following message when the
DATA step compiler encounters a letter immediately after a closing
single or double quote:
NOTE 49-169: The meaning of an identifier after a quoted string may
change in a future SAS release. Inserting white space
between a quoted string and the succeeding identifier
is recommended.
This message is intended to warn users that additional literal types
may be added in the future, and inserting a blank space after a quoted
string ensures that programs continue to run without errors in future
releases of SAS.
[/pre]
as described here:
http://support.sas.com/techsup/unotes/SN/003/003353.html
Since you ARE using a date constant, you can just ignore that NOTE. When I tested the WHERE statement, my version of the WHERE (inside a PROC PRINT) worked both with and without the dot.
I generally recommend starting with the simplest code that works, because in the long run, the simplest code will be the easier to understand and easier to maintain.
cynthia