Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice Questions)



Question : You have been given below dataset

And program as below
data course100;
merge course101 (rename=(FEE=TRAINING_FEE))
course102 (rename=(FEE=REGISTRATION_FEE)) ;
by COURSE_ID;
run;

What is the expected once you run above program?

 : You have been given below dataset
1. All the observation which does not have same course_id in both the dataset will be discarded.

2. Merged output will be generated and FEE columns will be re-named in the output.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Program will generate error


Correct Answer : Get Lastest Questions and Answer :
Explanation: Whenever you use merge match data must be sorted else compile will give the error.





Question : Which of the following statements is true regarding direct access of data sets?


  : Which of the following statements is true regarding direct access of data sets?
1. a
2. b
3. Access Mostly Uused Products by 50000+ Subscribers
4. d

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?


  : Which of the following statements is true regarding direct access of data sets?
1. missing
2. $30,000
3. Access Mostly Uused Products by 50000+ Subscribers
4. you cannot concatenate these data sets

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?

  : Which of the following statements is true regarding direct access of data sets?
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.

3. Access Mostly Uused Products by 50000+ Subscribers

4. In output only Fee column will be dropped.


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?

 : You have been given below datasets
1. MUMBAI

2. PUNE

3. Access Mostly Uused Products by 50000+ Subscribers

4. HYDERABAD

5. CHENNAI


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.


Related Questions


Question :

The following SAS program is submitted:

data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set WORK.MONEY has 7 observations. How many observations will the data set WORK.EMPSALARY contain?
 :
1. 0
2. 5
3. 7
4. 12



Question :

The following SAS program is submitted:

data work.accounting;
set work.dept1 work.dept2;
jobcode = `FA1';
length jobcode $ 8;
run;

A character variable named JOBCODE is contained in both the WORK.DEPT1 and WORK.DEPT2 SAS data sets.
The variable JOBCODE has a length of 5 in the WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set.
What is the length of the variable JOBCODE in the output data set?

 :
1. 3
2. 5
3. 7
4. 8



Question : Given the SAS data set SASDATA.TWO:
SASDATA.TWO
X Y
----
5 2
3 1
5 6
The following SAS program is submitted:

data sasuser.one two sasdata.three;
set sasdata two;
if x = 5 then output sasuser.one;
else output sasdata two;
run;

What is the result?
 : Given the SAS data set SASDATA.TWO:
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


Question : The following SAS program is submitted:
footnote1 `Sales Report for Last Month';
footnote2 `Selected Products Only';
footnote3 `All Regions';
footnote4 `All Figures in Thousands of Dollars';
proc print data = sasuser.shoes;
footnote2 `All Products';
run;
Which footnote(s) is/are displayed in the report?
 : The following SAS program is submitted:
1. All Products
2. Sales Report for Last Month All Products
3. All Products All Regions All Figures in Thousands of Dollars
4. Sales Report for Last Month All Products All Regions All Figures in Thousands of Dollars


Question : Given the raw data record DEPT:
----|----10---|----20---|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile `dept';
input dept $ 1-11 number 13- 15;
$insert statement here$
run;
Which SAS statement completes the program and results in a value of `Printing750' for the DEPARTMENT variable?
 : Given the raw data record DEPT:
1. department = dept II number;
2. department = left(dept) II number;
3. department = trim(dept) number;
4. department = trim(dept) put(number,3.);


Question : The following SAS program is submitted:
data one;
address1 = `214 London Way';
run;
data one;
set one;
address = tranwrd(address1, `Way', `Drive');
run;

What are the length and value of the variable ADDRESS?
 : The following SAS program is submitted:
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'.