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
Answers were Sorted based on User's Feedback
Answer / raghu kishor. k
proc contents data= dsname out=o/pdsname;
run;
proc sql; select name into: macrovariablename separated
by ' 'from o/pdsname;
quit;
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / 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 |
Answer / yuyin
Use PROC SQL; Select * into: macro_variables separated
by ' ' from table;
| Is This Answer Correct ? | 4 Yes | 7 No |
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?
What are the applications primarily used by business analyst? : Sas-bi
What is the difference between %local and %global?
Have you used macros? For what purpose you have used? : sas-macro
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
What makes sas stand out to be the best over other data analytics tools?
Could you please answers for this. 1.Code the tables statement for a single-level (most common) frequency. 2.Code the tables statement to produce a multi-level frequency.
How do dates work in sas?
how do i read multiple spaces in datasets? eg: vijaya raghava perumal.I tried with using & but it workss if its vijaya raghava but not for raghava perumal.how to do this?
what is OLAP?
How do I CREATE an external dataset with sas code? I would like to create within a sascode a non-exsistent textfile on the host. So I am not forced to create the file befor filling it.
what is the function of catx syntax? : Sas-administrator