What would the following datastep do?
Data _null_;
Set Dist end=eof;
Call Symput("xx"!!left(put(_n_,2.)),&dimension);
If EOF then
Call Symput('numrows',left(put(_n_,2.)));
Run;
dimension is a macro variable that is being passed here
Answer Posted / kumaraswamy maduri
It creates macro variables like xx1,xx2....xxnumber of
observations and all the variables will same value that
&dimesion has and it creates one more macro
variable "numrows" that contains number of observations as
character value.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
what is star schema? : Sas-di
Explain what is the use of proc gplot?
What are the data types in sas?
How do you control the number of observations and/or variables read or written?
what is study design in while working with SAS? what are screening variables in SAS?
explain about sas business intelligence? : Sas-bi
What is substr function?
Tell me about % include and % eval? : sas-macro
Have you used macros? For what purpose you have used? : sas-macro
What is a method to debug and test your SAS program?
what is the purpose of _error_? : Sas programming
Differentiate between sas functions and sas procedures.
What is the basic syntax of a sas program?
what is the difference between infile and input? : Sas-administrator
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di