i have a null dataset with 20 variables. i want to upload the
variables which contain name like a or k or anything in
another dataset.how can we create the dataset?

Answers were Sorted based on User's Feedback



i have a null dataset with 20 variables. i want to upload the variables which contain name like a ..

Answer / xxx

proc print data=DSN;
var a: k:;
run;

Is This Answer Correct ?    6 Yes 1 No

i have a null dataset with 20 variables. i want to upload the variables which contain name like a ..

Answer / sasuser

Ans: I didn't understood the question clearly. What I
understood is , the person wants to copy selected variables
from a dataset(which has no observations) to a different
dataset.The following is the solution:
proc sql;
create table want
like emptydataset (keep=n: a:)
;
quit;
Note:emptydataset does not contain any obs.
Let me know, If my solution is wrong.

Is This Answer Correct ?    1 Yes 2 No

i have a null dataset with 20 variables. i want to upload the variables which contain name like a ..

Answer / alok karan

data _null_ new;
set  qqq;
where name like "q%" or name like "w%";
put name total;
run;
proc print data=new;
run;

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SAS Interview Questions

how do i read multiple spaces in datasets? eg: vijaya raghava perumal.I tried with using & but it workss if its vijaya raghava but not for raghava perumal.how to do this?

8 Answers   Wipro, Xansa,


Name validation tools used in SAS

0 Answers  


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

2 Answers   CitiGroup,


What is the difference between reading data from an external file and reading data from an existing data set?

0 Answers  


how to import XTP files into SAS datasets?

1 Answers   Barclays, Institute For Plasma Research,






Explain the main difference between the sas procedures and functions? : Sas-administrator

0 Answers  


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

0 Answers  


What are the different versions of sas that you have used until now? : sas-grid-administration

0 Answers  


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 a macro routine?

0 Answers  


how sas deals with business intelligence? : Sas-bi

0 Answers  


Categories