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 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sudip chatterjee <sudip.memphis@gmail.com>
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 >


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