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 to delete the duplicates by using proc sql?

3 Answers   Genpact,


how to perform paired t-test using Base/SAS & SAS/Stat?

2 Answers  


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

0 Answers  


Does SAS ‘Translate’ (compile) or does it ‘Interpret’? Explain.

4 Answers   Accenture,


Explain the message ‘MERGE HAS ONE OR MORE DATASETS WITH REPEATS OF BY VARIABLE’.

2 Answers  


what is washout period?

3 Answers   Cognizant,


Please, anyone, let me know the style or an example of using 'by='/'by' variable of a PDV(Program Data Vector)

3 Answers   Verinon Technology Solutions,


What is proc sort?

0 Answers  


In PROC PRINT, can you print only variables that begin with the letter “A”?

8 Answers  


What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?

1 Answers   Quintiles,


what is operational data and operational system? : Sas-di

0 Answers  


Why is a STOP statement needed for the point=option on a SET statement?

2 Answers   Quintiles,


Categories