When merging 2 datasets with a common variable (not merge
key), how to keep both?
Answers were Sorted based on User's Feedback
Answer / reshma
data newdata;
merge dataset1 (in=a) datset2 (in=b);
if a or b;
by commonvar;
run;
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / vigneshwaran.s
Rename the variable in First data or in The Second Data:
Like,
Merge A(rename=(comman_var=New_var))(in=x)
B (in=y);
by New_var;
Run;
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / madhavi.nowduru@gmail.com
set dataset1 dataset2;
by var;
| Is This Answer Correct ? | 0 Yes | 3 No |
How would you generate 1000 observations from a normal distribution with a mean of 50 and standard deviation of 20. How would you use PROC CHART to look at the distribution? Describe the shape of the distribution.
what is Global Symbol table and Local symbol table?
Can you calculate the mean, median and mode of the following data set using data step logic? Don't use any function or procedure. data a; input age @@; datalines; 22 32 32 32 43 23 24 56 45 54 28 29 27 26 25 28 30 20 18 37 36 47 46 56 19 20 ; run; I have calculated the mean which i have posted in the answer section.
Which is Best Institute for learning SAS BASE & SAS BI in Hyderabad? Can anyone suggest me ?
What do you feel about hardcoding?
what are the types of interactive display types? : Sas-bi
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
Enlist the functions performed by sas.
What is program data vector (pdv) and what are its functions?
How do you download a flat file from Mainframe to your local PC using SAS?
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
Mention few capabilities of sas framework.