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

· What are some good SAS programming practices for processing very large data sets?

6 Answers   Quintiles,


What does proc print, and proc contents are used for?

0 Answers  


what is lifetest

1 Answers   Cognizant,


Do you need to rearrange the order of the data for the report?

0 Answers  


What are the features of SAS?

0 Answers  


How do you add a number to a macro variable? : sas-macro

0 Answers  


data jagan1.s; input bp$; cards; 100/90 120/89 112/87 run; in the above code how to convert character data values to numeric data values?

3 Answers  


When merging 2 datasets with a common variable (not merge key), how to keep both?

3 Answers  


What versions of SAS have you used (on which platforms)?

0 Answers   Quintiles,


How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

0 Answers   Accenture,


explain the proc in sas? : Sas-administrator

0 Answers  


what is the difference between floor and ceil functions in sas? : Sas-administrator

0 Answers  


Categories