How will you assign all the variables of an dataset into a
macro variable separated by a space? For example if a
dataset has variables A,B,C. Assign them to a macro variable
X as
X=A B C

Answer Posted / somanath

PROC CONTENTS DATA=SASHELP.CLASS OUT=T VARNUM;
RUN;

PROC SQL NOPRINT;
SELECT NAME INTO : Y separated BY ' ' FROM T ;
QUIT;



%put &Y;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to convert a numeric variable to a character variable?

628


Tell e how how dealt with..

1766


What are types of transport files?

6847


for report generation which one you used proc report or data_null_?

6578


describe how to adjust the performance of data integrator? : Sas-di

563






What does the trace option do?

662


Which command is used to perform sorting in sas program?

595


Mention what are the data types does SAS contain?

695


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

579


How do you delete duplicate observations in sas?

573


What is maximum storage capability of SAS?

904


What are the default statistics for means procedure?

640


what is the use of sas management console? : Sas-di

613


Differences between where and if statement?

582


Which date function advances a date, time or datetime value by a given interval?

662