Please write codes to merge two datasets and keep every
record in the first dataset.
Answer / reshma
proc sort data=dataA;
by commonvar;
run;
proc sort data=dataB;
by commonvar;
run;
data new;
merge dataA (in=a) dataB (in=b);
if a ;
by commonvar;
run;
Is This Answer Correct ? | 14 Yes | 0 No |
How to read the file names of a text files from a shared drive using SAS?
data study; input Subj : $3. Group : $1. Dose : $4. Weight : $8. Subgroup; x= input(Weight,5.1); datalines; 001 A Low 220 2 002 A High 90 1 003 B Low 193.6 1 004 B High 165 2 005 A Low 123.4 1 ; Why does X get truncated? X shows up as 22 instead of 220,9 instead of 90 and 19.8 instead of 198? This problem doesnt happen with the values 193.6 and 123.4. This does not happen if x is read on the 5. informat instead of the 5.1 informat
/*i have the following dataset.*/ data score; input marks ; datalines; 10 20 30 40 50 60 70 80 90 100 ; run; Now i should get the result as sum of 1 to 5 i.e(10+20+30+40+50)=150 and 2 to 6 i.e(20+30+40+50+60)=200 and 3 to 7 i.e(30+40+50+60+70)=250 and so on. how to get it. thanks in advance
What are the criticality that you have faced during your project in SAS?
I am looking to buy a sas advance book. So any one can guide me that which one i should buy.
If reading an external file to produce an external file, what is the shortcut to write that record without coding every single variable on the record?
how does sas handle missing values in an update? : Sas programming
In which format does Date stores in sas..? What is the use of DATE in SAS.?
How to display duplicate observations in data?
what is the use of proc contents and proc print in sas? : Sas-administrator
how to generate the test data in sas without input data? : Sas-administrator
how do you derive descriptive statistics?
1 Answers Accenture, Quintiles,