Date: Fri, 13 Jun 2008 11:23:54 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Question about the data step
':' modifier seems to work:
data xx;
input abc_x abc_y abc_z k;
if min(of abc_:)=max(of abc_:)=1;
cards;
1 2 3 5
1 1 1 7
4 5 7 2
1 1 1 9
;
proc print;
run;
Obs abc_x abc_y abc_z k
1 1 1 1 7
2 1 1 1 9
On Fri, 13 Jun 2008 10:40:47 -0400, Jane <program.sas@GMAIL.COM> wrote:
>Hi
>
>I have a question to pull out some specific subject from the dataset. I
have
>a dataset, the variables name started with same word like:
>
>"abc_aaa" "abc_bbb" "abc_ccc".....
>"xyz_aaa" "xyz_bbb" "xyz_ccc".....
>
>Right now, I want to pull out the subjects if abc_* equal to something and
>xyz_ eaqual to something. How can I write a simple code instead of writing
>all the variable name and if else sentence in my code?
>
>Thank you very much!
>
>Jane
|