LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 18 Oct 2007 08:47:08 -0400
Reply-To:   Michael Raithel <michaelraithel@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michael Raithel <michaelraithel@WESTAT.COM>
Subject:   Re: Is WHERE ALSO documented
In-Reply-To:   <1192708645.593362.174650@v29g2000prd.googlegroups.com>
Content-Type:   text/plain; charset="us-ascii"

Dear SAS-L-ers,

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"; > %end; > %else %do; > title2 "for Course &crs only"; > where also course_code="&crs"; > %end; > run; > %mend; > 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:

http://support.sas.com/onlinedoc/912/getDoc/lrcon.hlp/a000999255.htm

...(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" operator!

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" E-mail: MichaelRaithel@westat.com

Author: Tuning SAS Applications in the MVS Environment

Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172

Author: The Complete Guide to SAS Indexes http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The palest ink is better than the best memory. - Chinese proverb +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Back to: Top of message | Previous page | Main SAS-L page