| Date: | Wed, 23 Jan 2002 14:24:01 -0500 |
| Reply-To: | diskin.dennis@KENDLE.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | diskin.dennis@KENDLE.COM |
| Subject: | Re: Variables |
|
| Content-type: | text/plain; charset=us-ascii |
|---|
Grame,
One approach, you can use some pre-processor (macro) macro code.
1. Read the Parameter variables into a macro string and
2. Use the macro string in a keep statement for the second data set.
An untested example:
Proc SQL noprint;
select Parameter into :keepstr separated by ' ' from Dset1;
data out;
set Dset2(keep=&keepstr);
run;
HTH,
Dennis Diskin
From: Graeme Kirton <gkirton@FILCS.COM>@LISTSERV.UGA.EDU> on 01/23/2002
09:50 AM
Please respond to gkirton@FILCS.COM
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: Variables
Hi Folks, hope I can get an answer.
Ive a dataset and a variable called 'Parameter'.
Ive another datset with 120variables. I need to know how to subset this
dataset
so that only the Vars that appear under Parameter in the other dset
appear??
Dset1;
Parameter
CAP
RC
VP
Dset2;
Lotno Wafer Var1 RON CAP RS RC VP
I know how to use keep drop so nothing funny eh..... I want to be able to
say, "
If parameter from dset1 exist in dset 2 create."
Thankyou.............GK
____________________________________________________________________________________________________________
Disclaimer
This email may contain privileged/confidential information and/or copyright
material. It is intended only for the use of the person(s) to whom it is
addressed and any unauthorised use may be unlawful. If you receive this
email
by mistake, please advise the sender immediately by using the reply
facility on
your email software and delete the material from your computer.
Opinions, conclusions and other information in this email that do not
relate to
the official business of this organisation shall be understood as neither
given
nor endorsed by it.
If this message forms part of a quotation, the quotation is an invitation
to
treat only. No contract subsists until Filtronic Plc (or its subsidiary
companies) accepts your order. Acceptance of your order is made subject to
our
standard Terms and Conditions.
Website Address http://www.filtronic.com
|