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

Have you used macros? For what purpose you have used? : sas-macro

1 Answers  


how to generate report for 0 observation dataset?

3 Answers   Mind Tree, Student,


what do the sas log messages "numeric values have been converted to character" mean? : Sas programming

1 Answers  


How can you create a macro variable with in data step? : sas-macro

1 Answers  


Describe what are the different levels of administrative users in sas? : sas-grid-administration

1 Answers  


Mention what is PROC in SAS?

1 Answers  


why is a stop statement needed for the point=option on a set statement? : Sas programming

1 Answers  


What do you know about symput and symget?

1 Answers  


what is intially documentation for a sas programmer?

2 Answers   Accenture,


Which is the best training institute for SAS in hyderabad.

112 Answers   Stansys Software Solutions,


Hi I have list of products in a dataset, which are classified by other name for eg:- there is a product A> Malambo Shiraz Malbec 750ML(0388) which is a Red wine.Now i need to generate a report where it shows if this product appears then it should b displayed as red wine,similarly for other products and other classification. I dont wan use proc format.

4 Answers   Symphony,


How to get top scorer student from a class-table having different sections A,B, C & D? Each section having same number of students.

2 Answers  


Categories