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 |
Name statements that are execution only.
explain the function of substr in sas? : Sas-administrator
What happens in the following code, if u type 8 instead of *? proc sql noprint; create table abc as select 8 from lib.abc; quit;
what is the difference between %put and symbolgen?
Explain proc univariate?
how do you debug and test your sas programs? : Sas programming
What procedure you used to calculate p-value?
2 Answers Accenture, Quintiles,
Differences between where and if statement?
How the date 04oct1994 is stored in SAS,not only give the answer explain in brief?
At compile time when a SAS data set is read, what items are created?
State the difference between INFORMAT and FORMAT ?
in the flow of data step processing, what is the first action in a typical data step? : Sas programming