Premium

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



Question :

The following SAS program is submitted:
data work.one;
x = 3;
y = 2;
z = x ** y;
run;
Which one of the following is the value of the variable Z in the output data set?


  :
1. 6
2. 9
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails to execute due to errors.

Correct Answer : Get Lastest Questions and Answer :

Explanation: ** = exponentiation

X**Y raise X to the power of Y

So 3 at the power of 2 = 9







Question : The SAS data set named WORK.TEST is listed below:
capacity airplanetype staff
150 Large 10

Which one of the following SAS programs created this data set?
A. data work.test;
capacity = 150;
if 100 le capacity le 200 then
airplanetype = 'Large' and staff = 10;
else airplanetype = 'Small' and staff = 5; run;

B. data work.test;
capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large';
staff = 10;
end;
else
do;
airplanetype = 'Small';
staff = 5; end; run;

C. data work.test;
capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large';
staff = 10;
else
do;
airplanetype = 'Small';
staff = 5; end; run;

D. data work.test;
capacity = 150;
if 100 le capacity le 200 then;
airplanetype = 'Small';
staff = 5;
else;
airplanetype = 'Large'; staff = 10; run;



  : The SAS data set named WORK.TEST is listed below:
1. a
2. b
3. Access Mostly Uused Products by 50000+ Subscribers
4. d


Correct Answer : Get Lastest Questions and Answer :

Explanation: In A you have tis line in error
airplanetype = 'Large' and staff = 10;

In C you have a Structure Problem

and In D the condition is reverse
If we would perform more than one action under an if statement, we should use do-end loop whithin.

So the answer is 2






Question :

The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:
WORK.EMPLOYEE WORK.SALARY
fname age fname salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
merge work.employee
work.salary;
by fname;
totsal + salary;
run;
How many variables are output to the WORK.EMPDATA data set?


  :
1. 3
2. 4
3. Access Mostly Uused Products by 50000+ Subscribers
4. No variables are output to the data set as the program fails to execute due to errors.


Correct Answer : Get Lastest Questions and Answer :

Explanation: : if work.employee had Dan & his salary info then the Ans wd be B:

Obs fname age salary totsal
1 Bruce 30 25000 25000
2 Bruce 30 35000 60000
3 Dan 40 . 60000
4 Dan 25000 . 60000
The Variables are: Fname, age, salary and totsal (i.e 4 variables)
Note: Obs will not be counted here




Related Questions


Question : When you run the below program what would happened. Assume hesample.dat has valid observations.
data prices;
infile '/folders/myfolders/hadoopexam/hesample1.dat';
input CODE $ NAME$ FEE1 FEE2;
format FEE1 fee. Name name.;
run;

data work.subset;
set prices (firstobs=3 obs=2);
run;

 : When you run the below program what would happened. Assume hesample.dat has  valid observations.
1. Subset data set will have 2 observation.

2. Subset data set will have 3 observation.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Program will generate error



Question : You are running below program
data course2017_1;
obsnum=5;
set course2017 (keep=COURSE_NAME LOCATION) point=obsnum;
output;
stop;
run;

where course2017 has 100 observations. What happen when you run the program?

 : You are running below program
1. It will give error

2. It will generate warning messages

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will generate output with 1 observations having two columns only.



Question : You are running below program
data course2017_1;
set course2017 end=last;
if last;
run;

where course2017 has 100 observations. What happen when you run the program?

 : You are running below program
1. It will give error and no output will be generated

2. It will give warning and 100 observations will be in the output.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will generate only 1 output with warning



Question : You have below program
data course2017_1;
set course2017 end=last;
if last;
run;

Now during the compilation phase, all the variables will be created in the program data vector, and all the observation will be set to

 : You have below program
1. Blank values

2. Missing Values

3. Access Mostly Uused Products by 50000+ Subscribers

4. There will not be any observations



Question : You have been wring the SAS programs, now you want to override the behavior of output generations, which of the option or statement you
will choose

 : You have been wring the SAS programs, now you want to override the behavior of output generations, which of the option or statement you
1. DROP= and KEEP= data set options

2. OUTPUT statement

3. Access Mostly Uused Products by 50000+ Subscribers

4. BY statement



Question : You have been given below datasets


Which of the following program will generate result as Course100 dataset using Course101 and Course102?

 : You have been given below datasets
1. data course100;
set course101;
set course102;
run;


2. data course100;
set course101 set course102;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
set course101 set course102;
by course_id;
run;


4. data course100;
merge course101 set course102;
by course_id;
run;