Premium

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



Question : Which of the following is considered correct program to generate dataset named course_?

 : Which of the following is considered correct program to generate dataset named course_?
1. data course2017_1 (drop=DATE DURATION);
set course2017 (keep=COURSE_NAME DURATION FEE DATE );
if DURATION<25;
TOTALFEE=TOTALFEE+FEE;
run;


2. data course2017 (drop=DATE DURATION);
set course2017_1 (keep=COURSE_NAME DURATION FEE DATE );
if DURATION<25;
TOTALFEE=TOTALFEE+FEE;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
set course2017 (keep=COURSE_NAME FEE DATE );
if DURATION<25;
TOTALFEE=TOTALFEE+FEE;
run;


4. data course2017_1 (drop=DATE DURATION);
set course2017 ;
if DURATION<25;
TOTALFEE=TOTALFEE+FEE;
run;


Correct Answer : Get Lastest Questions and Answer :
Explanation: You need to understand two things here.

Syntax Issue : As you need to create new dataset than it should be in Data step. Hence, option 2 is out because it is not the correct one. In data step
it has given course2017.

Another is logical things : As you can see while creating data it also has some logic based on column DURATION and create a new column named TOTALFEE.
If you want to drop DURRATION column in the output that is fine, but you also want it for calculation. Hence, you need to keep it for the calculation.
In this case only option 2 is correct, which keep as well as drop this column.





Question : You have written following program using By statement

data courses2017_1;
set courses;
by course_name;
if first.course_name then TOTALFEE=0;
TOTALFEE+FEE;
if last.course_name;
run;

Which of the following statements are correct?

A. Dataset courses has to be sorted by course_name
B. There two variables will be created FIRST and LAST for the course_name variable.
C. FIRST and LAST are the two variables in each By group which represent first and last observation of that group.
D. FIRST and LAST variable will be stored with the dataset courses2017_1.

 : You have written following program using By statement
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,D

Correct Answer : Get Lastest Questions and Answer :
Explanation: When you create a new dataset using By statement than original data set must be sorted by the columns which are used in the by
statement.

Another important thing is that when you use By statement in set data step than two variables will be created FIRST and LAST which represent first and
last observation of that group created using By statement. However, they are temporary and will not be stored with the dataset.





Question : You have been given below SAS program what would be the result when you execute it?

data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
obsnum=5;
stop;
datalines;
100 SAS MUMBAI 5000 01-JAN-2017 30
101 MACHINE PUNE 7000 01-FEB-2017 24
102 MACHINE PUNE 7000 01-MAR-2017 24
103 HADOOP BANGLORE 8000 01-APR-2017 40
104 HADOOP BANGLORE 9000 01-MAY-2017 30
105 SPARK CHENNAI 7000 01-JUN-2017 32
106 SPARK CHENNAI 6500 01-JUL-2017 30
107 SPARK CHENNAI 6500 01-AUG-2017 30
108 HADOOP AHMEDABAD 5000 01-SEP-2017 24
109 SAS MUMBAI 5000 01-OCT-2017 24
110 SAS JODHPUR 5000 01-NOV-2017 24
;
run;

 : You have been given below SAS program what would be the result when you execute it?
1. It will be generating 5 observation in the output

2. It will generate 1 observation in output

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will give error


Correct Answer : Get Lastest Questions and Answer :
Explanation: In the given program you need to understand the stop statement. As soon as stop statement is found SAS program will be stopped
for further execution. And to generate the output whatever in the dataset till the stop statement, it require output statement. As there is no output
statement , hence it will generate empty results.


Related Questions


Question : You have been given below SAS dataset, what is the type of the name variable
 : You have been given below SAS dataset, what is the type of the name variable
1. Numeric

2. Character

3. Floating Point Number

4. Variable



Question : In the given dataset, what is the datatype of date variable?


 : In the given dataset, what is the datatype of date variable?
1. Date

2. Character

3. Numeric

4. Floating Point



Question : You have set a system option like VALIDVARNAME=ANY. Which of the following is a valid variable name?

 : You have set a system option like VALIDVARNAME=ANY. Which of the following is a valid variable name?
1. 4HadoopExam

2. $Price

3. _HadoopExam_

4. Hadoop-Exam

5. All of the above are fine



Question : You have been working following SAS files, you need to find which of the following a permanent file is?


 : You have been working following SAS files, you need to find which of the following a permanent file is?
1. SASHELP.PrdSale

2. SASUSER.HESALES

3. SUBSCRIBER.COURSES

4. All of the above



Question : You have been working with the HadoopExam subscriber data. You need to work on some temporary data for the all the subscriber in last one
year and named as HESUBSCRIBER. How can you reference a temporary SAS data set named HESUBSCRIBER?
A. HESUBSCRIBER
B. Work. HESUBSCRIBER
C. HE. HESUBSCRIBER
D. HE.SUBSCRIBER

 : You have been working with the HadoopExam subscriber data. You need to work on some temporary data for the all the subscriber in last one
1. A,B
2. B,C
3. C,D
4. A,D
5. B,D


Question : You have been given below SAS dataset

What is the default length of the variable fee?

 : You have been given below SAS dataset
1. 5

2. 6

3. 7

4. 8

5. Looking at sample data, we cannot default length.