Date: Fri, 1 Oct 2010 11:32:42 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Question on Data Step
In-Reply-To: <AANLkTi=U21YHLdAFgLug1syn8K1by9oi+jxhsJq1pwJL@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
As the ever-concise toby points out, CALL MISSING will do what you want, but
will operate on a variable list:
call missing(a,b,c,d,...,z);
If your variables are in an array, or are in the dataset in a fashion to be
able to take advantage of any of the variable list options, then you can use
that as well, in combination with the OF keyword.
call missing(of var:) for example for VAR1, VAR5, VAR8.
-Joe
On Fri, Oct 1, 2010 at 11:11 AM, sudip chatterjee
<sudip.memphis@gmail.com>wrote:
> Hi All,
>
> I have created a variable called flag(1 or 0) based on certain conditions.
> Now I want to make variables A-Z set to missing when flag = 1. I wrote a
> long program taking each variable at a time and set that to missing value
> like
>
> if flag = 1 then A = . ;
> else A = A ;
> ........
>
>
> I want to do it in 1 step may be using some kind of loop, I will
> appreciate
> any lead on this approach.
>
> regards
>
|