Do you need to combine data sets? How should you combine
data sets– MERGE or SET statements in DATA steps,PROC
APPEND,PROC SQL?
Answers were Sorted based on User's Feedback
Answer / ankit
it is depend upon my needs how to join these data set if we want to join data vertically then use set otherwise for horizontal i'll use merge.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / charan araveti
Append/Set:
If you want to Add/Append data to Existed/Newly created
Dataset (With same variabls)
EX: you have DATA SETS Like JAN,FEB,MAR........,DEC.
and you want to create data set like "Sales_2010"
you have to use "SET/APPEND" Statements.
MERGE:
If you want add Existed variables to DataSet you have to use
Merge.
EX: If you 2 Dtasets of one person like Personal &
Professional and you want to all details in one dataset
means you have to use "Merge" with 'BY' Statement.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vimal
proc append is best to just combine two datasets.
it appends in bulk and without have to read and send to output. it just puts the dataset in data= to dataset in base=
| Is This Answer Correct ? | 0 Yes | 0 No |
sas macros
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
do you prefer proc report or proc tabulate? Why? : Sas programming
what type of reports you are generating in your company...???
2 Answers GSK GlaxoSmithKline,
What’s the difference between var b1 – b3 and var b1 — b3?
How do you write a test plan?
What is a post baseline?
What is _n_?
Explain what is data step?
libname deepak 'C:\SAS Files'; proc format; invalue convert 'A+' = 100 'A' = 96 'A-' = 92 'B+' = 88 'B' = 84 'B-' = 80 'C+' = 76 'C' = 72 'F' = 65; data deepak.grades; input ID $3. Grade convert.; *format Grade convert. ; datalines; 001 A- 002 B+ 003 F 004 C+ 005 A ; proc print data = deepak.grades; run; I get the following output Obs ID Grade 1 001 . 2 002 . 3 003 . 4 004 . 5 005 . I don’t understand why Grade shows up as a missing value. Everything seems fine, including ID $3. Now, in case I use ID : $3. Or use column input, I get the desired output. Kindly help Deepak
What is the one statement to set the criteria of data that can be coded in any step?
How would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable?