|Date: ||Tue, 26 Mar 1996 00:48:00 EDT|
|Reply-To: ||"Chen, Xi" <xic@UTKVX.UTK.EDU>|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||"Chen, Xi" <xic@UTKVX.UTK.EDU>|
|Organization: ||University of Tennessee|
|Subject: ||Re: Q: Extracting macro parameters|
I think you may think about doing the following:
1. Run Proc Contents and save the output to a data set. Then, all the
variable name is under a column, and assume that the column name is
named COLNAME, the data set is named ONE.
2. data two;
if (using scan function to select all the records in which the
value of COLNAME contains "var");
You will get what you want. Hope it helps.
In article <3156789C.7CF7@marketresponse.nl>, Jon Webb
>In macro-language, I want to break a series of variables into seperate
variables. Also, I want to
>know the number of variables. I have managed to do so with space-seperated
variables, but have
>problems with dealing with the dash-symbol.
>This is what I want:
>input: var8-var11 var18 var20-var21
>result: %let v1 = var8; %let v2 = var9; ... ; %let v6 = var20; %let v7 =
var21; %let nrvar = 7;
>Has anyone already written a macro-utility like that?