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

Answers were Sorted based on User's Feedback



What would the following datastep do? Data _null_; Set Dist end=eof; Call Symput("xx&quo..

Answer / 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

What would the following datastep do? Data _null_; Set Dist end=eof; Call Symput("xx&quo..

Answer / akshata shenvi

here numeric values have been converted to character values
at the place given by (line) :column

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More SAS Interview Questions

For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

0 Answers  


Does anybody have SAS Training manual or documentation or can you refer me any book to have better understanding on SAS. I am fresher to SAS tool. (Ready to pay)

4 Answers  


Can you continue to write code while the rest of the people on the floor where you work have a noisy party to which you were not invited?

2 Answers   Oracle,


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

0 Answers  


in data set200 observation how to take 110,150,170 using sql procedure?

7 Answers   Accenture,






which date functions advances a date time or date/time value by a given interval? : Sas programming

0 Answers  


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

0 Answers  


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?

0 Answers   Oracle,


What is the order of evaluation of the comparison && logical && relational operators:?

2 Answers   CitiGroup,


PROC SQL always ends with QUIT statement.Why cant you use RUN in PROQ SQL ?

7 Answers   HP,


how does sas handle missing values in procs? : Sas programming

0 Answers  


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,


Categories