Ans : 1 Exp : Concatenating appends the observations from one data set to another data set. The new data set contains the total number of records from all input data sets, so b is incorrect. All the variables from all the input data sets appear in the new data set, so c is incorrect.
Question : If you concatenate the data sets below in the order shown, what is the value of Sale in observation 2 of the new data set?
Ans : 1 Exp : The concatenated data sets are read sequentially, in the order in which they are listed in the SET statement. The second observation in Sales.Reps does not contain a value for Sale, so a missing value appears for this variable. (Note that if you merge the data sets, the value of Sale for the second observation is $30,000.)
Question : You have been given below dataset
You run the below program
data course100 (drop=COURSE_ID); merge course101 (in=in_first rename=(DATE=TRAINING_DATE)) course102 (drop=FEE in=in_second rename=(DATE=REGISTRATION_DATE)) ; by COURSE_ID; if in_first and in_second; run;
What is the output?
1. Merged data will be generated wherever column name matches and course_id will be dropped.
2. In merged data DATE columns will not be renamed.
Correct Answer : Get Lastest Questions and Answer : Explanation: Whenver you want to drop the columns but want them to use during processing than you should not drop them in merge statement from individual dataset. Instead should be dropped from final dataset. Hence, by that time processing will be done on that dataset using that variable like course_id is being used for merging the data. Once, final result is generated course_id can be dropped.
Question : You have been given below datasets
Now you merge all these three datasets using course_id, what would be values of location column in 5th observation?
Correct Answer : Get Lastest Questions and Answer : Explanation: When 2nd and 3rd datasets are merged, you can see value in By column course_id remain same. Hence, 5th observation will retain location info from previous observation. So location in both 4th and 5th observation will be KOLKATA. Similarly for 2nd and 3rd observation location will remain PUNE.
What is the result? 1. data set SASUSER.ONE has 5 observations data set SASUSER.TWO has 5 observations data set WORK.OTHER has 3 observations 2. data set SASUSER.ONE has 2 observations data set SASUSER.TWO has 2 observations data set WORK.OTHER has 1 observations 3. data set SASUSER.ONE has 2 observations data set SASUSER.TWO has 2 observations data set WORK.OTHER has 5 observations 4. No data sets are output. The DATA step fails execution due to syntax errors
What are the length and value of the variable ADDRESS? 1. Length is 14; value is `214 London Dri'. 2. Length is 14; value is `214 London Way'. 3. Length is 16; value is `214 London Drive'. 4. Length is 200; value is `214 London Drive'.