Date: Thu, 23 Sep 2010 11:11:01 -0400
Reply-To: "Gilsen, Bruce F." <bruce.gilsen@FRB.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Gilsen, Bruce F." <bruce.gilsen@FRB.GOV>
Subject: Re: SAME-AND operator in Data Step
I discussed this in one of my old papers, "SAS Program Efficiency for
Beginners," which I still give a few times a year at work for new users.
I always recommend against use of SAME-AND because IMHO it creates "job
speaking only for myself (and my fantasy baseball team, which will
try for its 5th title in 23 years in 2011)
On Tue, 21 Sep 2010 09:24:52 -0500, Data _null_; <iebupdte@GMAIL.COM>
>On Tue, Sep 21, 2010 at 9:17 AM, Viel, Kevin <firstname.lastname@example.org> wrote:
>I am not sure how this might be better than:
>> Where ( PRODUCT in('H','P','Q') or GROUP=:'E' )
>> And FLAG_A='Y'
>> And FLAG_B='N';
>> And INCURRED_DATE between &DATE1 and &DATE2
>It's not better but for a different purpose.
>Use the SAME-AND operator to add more conditions to an existing WHERE
>expression later in the program without retyping the original
>conditions. This capability is useful with the following:
>interactive SAS procedures
>full-screen SAS procedures that enable you to type a WHERE expression
>on the command line
>any kind of RUN-group processing.
>Use the SAME-AND operator when you already have a WHERE expression
>defined and you want to insert additional conditions.