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 |
Intern stastical programmer written test
Describe the ways in which you can create a macro variable?
What is the purpose of the trailing @? The @@? How would you use them?
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
What sas features do you use to check errors and data validation?
what is Difference between PROC SQL JOINS and MERGE?
sas macros
How to find out no. of business days in a month using macros.???(excluding weekends and holidays).
How do dates work in sas?
Name validation tools used in SAS
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
what are methods to identify duplicate observations?