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



How will you assign all the variables of an dataset into a macro variable separated by a space? For..

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

How will you assign all the variables of an dataset into a macro variable separated by a space? For..

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

How will you assign all the variables of an dataset into a macro variable separated by a space? For..

Answer / yuyin

Use PROC SQL; Select * into: macro_variables separated
by ' ' from table;

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More SAS Interview Questions

Which command is used to save logs in the external file?

0 Answers  


What do the mod and int function do? : Sas programming

0 Answers  


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

0 Answers  


SAS using companies in chennai

1 Answers  


How would you code a merge that will keep only the observations that have matches from both sets?

5 Answers  


How the date 04oct1994 is stored in SAS,not only give the answer explain in brief?

5 Answers  


How can you put a "trace" in your program?

2 Answers   Quintiles,


Give e an example of..

0 Answers  


What are the difference between sas functions and procedures?

0 Answers  


What is the difference between %put and symbolgen? : sas-macro

0 Answers  


how to rearrange the data as our wish by using dataset block?

4 Answers   Cognizant,


Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager

0 Answers  


Categories