Hari posted the following interesting question:
> I came across usage of the WHERE ALSO in online learning.
> I understand now that it performs same as "WHERE SAME AND
> ..." but not able to see the same documented in help? I
> checked up through the Where statement portion in SAS
> Language Reference: Dictionary.
> %macro attend(crs,start=01jan2001,stop=31dec2001);
> %let start=%upcase(&start);
> %let stop=%upcase(&stop);
> proc freq data=sasuser.all;
> where begin_date between "&start"d and "&stop"d;
> table location / nocum;
> title "Enrollment from &start to &stop";
> %if &crs= %then %do;
> title2 "for all Courses";
> %else %do;
> title2 "for Course &crs only";
> where also course_code="&crs";
Hari, very interesting. No, make that VERY INTERESTING! That construct
looks familiar, but I cannot put my finger on where I have seen/used it
before. It reminds me of SCL-type code that I used in the dim and
distant past in SAS/AF applications.
I see that there is something like this in the SAS Online Documentation,
in the SAME-AND operator for the WHERE statement:
...(when you get to this link do a search for SAME-AND), but I do not
see a WHERE ALSO, anywhere. I wonder if this is a relic from a previous
version of SAS????
So, a BIG ATTABOY (or ATTAGIRL) and a BIG cup of Starbuck's coffee to
the SAS-L-er who can put his/her finger on the illusive "WHERE ALSO"
Hari, I'll look forward to seeing what our SAS-L colleagues come up with
on the interesting question you raised!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not
reflect those of my organization or my associates. All SAS code and/or
methodologies specified in this posting are for illustrative purposes
only and no warranty is stated or implied as to their accuracy or
applicability. People deciding to use information in this posting do so
at their own risk.
Michael A. Raithel
"The man who wrote the book on performance"
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments,
Author: The Complete Guide to SAS Indexes
The palest ink is better than the best memory. - Chinese proverb