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 |
Can you use a macro within another macro? If so how would SAS know where the current acro ended and the new one began?
where will go the observations that were deleted by delete statement?
How long can a macro variable be? A token? : sas-macro
How would you remove a format that has been permanently associated with a variables?
In the flow of DATA step processing, what is the first action in a typical DATA Step?
how to display duplicated observations in a data using base sas.
13 Answers HCL, TCS,
how do i get last 10obs from a dataset when we don't know about the number of obsevations in that dataset?
Tell e how how dealt with..
What is the order of evaluation of the comparison operators: + - * /** ()?
How do you debug and test your SAS programs?
What’s the difference between var b1 – b3 and var b1 — b3?
what are the differences between proc report and proc tabulate?