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;

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

2178


how can you import .csv file in to sas? : Sas programming

830


How many data types are there in SAS?

808


what is sas metadata repository? : Sas-bi

808


how to do user inputs and command line arguments in sas?

2651


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

802


what do you mean by data staging area? : Sas-di

817


what is the purpose of _error_? : Sas programming

836


Explain what is the use of proc gplot?

911


Mention sas system options to debug sas macros.

893


What do the PUT and INPUT functions do?

996


What can be the size of largest dataset in SAS?

933


i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm

2119


What does P-value signify about the statistical data?

1078


Differentiate between proc means and proc summary.

775