|Date: ||Wed, 23 Jan 2002 14:24:01 -0500|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|Subject: ||Re: Variables|
|Content-type: ||text/plain; charset=us-ascii|
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;
From: Graeme Kirton <gkirton@FILCS.COM>@LISTSERV.UGA.EDU> on 01/23/2002
Please respond to gkirton@FILCS.COM
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
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
so that only the Vars that appear under Parameter in the other dset
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
If parameter from dset1 exist in dset 2 create."
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
by mistake, please advise the sender immediately by using the reply
your email software and delete the material from your computer.
Opinions, conclusions and other information in this email that do not
the official business of this organisation shall be understood as neither
nor endorsed by it.
If this message forms part of a quotation, the quotation is an invitation
treat only. No contract subsists until Filtronic Plc (or its subsidiary
companies) accepts your order. Acceptance of your order is made subject to
standard Terms and Conditions.
Website Address http://www.filtronic.com