Monday, July 26, 2010

FAQs


  1. List out different ways to delete duplicates?
  2. What are the different procs that you have used so far?
  3. Difference between nodup and nodupkey?
  4. How do you get unique observations?
  5. List out different functions that you have used inside a macro?
  6. Tell me about the options that you have used in proc compare & proc report
  7. Can you write down the syntax for proc means or proc freq?
  8. What is the use of multilabel option in proc format?
  9. Brief me about the last project that you have worked on?
  10. What was the interesting technical issue that you have come across & how did you solve it?
  11. Why are you looking for a change?
  12. How do you rate yourself in macro?
  13. Compare merge and proc sql joins?
  14. How do you avoid merge by values?
  15. What is the advantage of using merge over proc sql?
  16. Which is efficient if or where condition? Why?
  17. What are the different ways to create a macro variable?
  18. What is the scope of global and local macro variable?
  19. What are the different items that you will look for in a log?
  20. Difference between format and informat?
  21. What is the use of data _null_?
  22. How do you write a code to see 'only the duplicate observations'?
  23. What is PDV?
  24. List out some automatic macro variables in sas?
  25. What is the result of using two set statement?

Sunday, July 25, 2010

Double Dash


Usually to keep a set of variables with same prefix we use “-“

For example:

COL1 COL2 COL3 COL4 COL5 COL6 COL7

To keep the above variables, we use (keep COL1 - COL7;)

but what if the variables does not have same prefix?

Yes, there is another way to keep the variables even when they do not have same prefix!

“--“ can be used to keep the variables in the order in which they occur in a dataset.

data dummy;
input a b1 b2 c;
datalines;
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
;
run;

data dummy1;
set dummy;
keep a -- b2;
run;

More:
http://studysas.blogspot.com/2009/07/even-you-can-use-hash-and-double-dash.html