The below code we are using for creating more than one
macro variables in proc sql using into clause. How we
can use same code to create macro variables vara, varb,
varc instead of var1, var2, var3.?
proc sql noprint;
select count(distinct(patient)) into :var1 - :var3
from dataset1
group by trtreg1c
;
quit;



The below code we are using for creating more than one macro variables in proc sql using into clau..

Answer / gk

ONly Var1 will be assigned based on the distinct patient
count. Var2 & Var3 macro variables will not be created .

We can not use :Vara - :Varc in into clause of select
statement for creating macro variables .Sinxe it is not a
array format.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More SAS Interview Questions

what is the use of catalog?

1 Answers   Cognizant,


what is data integration? : Sas-di

0 Answers  


wt is a-z and a--z?

3 Answers   Accenture,


How can I remove header from output data set?

0 Answers  


what is change analysis in sas di ? : Sas-di

0 Answers  






How to convert HTML file into SAS dataset?

0 Answers  


What do you feel about hardcoding?

3 Answers   Pfizer,


What is difference between sas rename and lable?

4 Answers  


How many ways to overcome a missing values???

0 Answers   HSBC,


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set.

10 Answers   Accenture,


What has been your most common programming mistake?

4 Answers   Wipro,


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

0 Answers  


Categories