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

How long can a macro variable be? A token? : sas-macro

0 Answers  


What SAS statements would you code to read an external raw data file to a DATA step?

10 Answers   NIIT,


What is the use of %include statement?

0 Answers  


Explain how you can debug and test your SAS program?

0 Answers  


Have you been involved in editing the data or writing data queries?

1 Answers   BioServe, Oracle, Sasken,






what is the primary data source for the wrs? : Sas-bi

0 Answers  


firstobs and obs are working only option wise,but we are using infile statement with firstobs and obs in a statement wise? so firstobs,obs working at options and statemnts or not?

1 Answers  


Compare sas with other data analytics tools.

0 Answers  


how to display duplicated observations in a data using base sas.

13 Answers   HCL, TCS,


how can you put a "trace" in your program? : Sas programming

0 Answers  


Code a PROC SORT on a data set containing State, District and County as the primary variables, along with several numeric variables.

7 Answers   Accenture,


what is data access? : Sas-di

0 Answers  


Categories