Using TRANSPOSE should not be a problem. How does what you tried
differ from this?
239 proc transpose data=sashelp.class(obs=0) out=varlist;
240 var name-numeric-weight name-character-weight;
NOTE: Numeric variables in the input data set will be converted to
character in the output data set.
NOTE: There were 0 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.VARLIST has 5 observations and 1 variables.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
242 proc sql noprint;
243 select _name_ into :varlist separated by ' '
244 from varlist;
NOTE: PROCEDURE SQL used (Total process time):
247 %put NOTE: VARLIST=&varlist;
NOTE: VARLIST=Age Height Weight Name Sex
On Wed, Dec 15, 2010 at 2:05 PM, Dan Abner <firstname.lastname@example.org> wrote:
> Hello everyone,
> I have the following macro call statement:
> %*MEANSOUT*(DATA=D1,VAR1=Y X1-X3 AGE--WEIGHT CHAR)
> Can anyone suggest the most efficient way to take the macro parameter VAR1
> and essentially transform the mixed variable specification ( a mix of list,
> number range, & name range) into a simple list of all variable names
> delimited by a single blank? I had written a short sequence of steps that I
> thought cleverly achieved this end, but my method only works when all
> variables are of the same type (due to dependence on PROC TRANSPOSE). My
> method does not work when the variables are of mixed variable type (num &
> Any help is appreciated.