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.passengers;
if OrigPassengers = then
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers =
TotalPassengers = sum (OrigPassengers, TransPassengers) +0;
run;
What is the value of the TOTALPASSENGERS variable in the output data set?
 : The following SAS program is submitted:
1. 0
2. 100
3. 200
4. (missing numeric value)

Correct Answer : Get Lastest Questions and Answer :
Exp: Returns the sum of the nonmissing arguments.
Syntax : SUM(argument,argument,... )
Required Argument : argument : specifies a numeric constant, variable, or expression. If all the arguments have missing values, then one of the following occurs:
If you use only one argument, then the value of that argument is returned.
If you use two or more arguments, then a standard missing value (.) is returned. Otherwise, the result is the sum of the nonmissing values. The argument list can consist of a
variable list, which is preceded by OF. Example : The following SAS statements produce these results.
x1=sum(4,9,3,8); => 24
x2=sum(4,9,3,8,.); => 24

x1=9; x2=39;
x3=sum(of x1-x2); => 48

x1=5; x2=6; x3=4; x4=9; y1=34; y2=12; y3=74; y4=39;
result=sum(of x1-x4, of y1-y5); => 183

x1=55; x2=35; x3=6;
x4=sum(of x1-x3, 5); => 101

x1=7; x2=7;
x5=sum(x1-x2); => 0

y1=20; y2=30;
x6=sum(of y:); => 50




Question :
Given the SAS data set PRICES:
PRICES
Prodid priceproducttypesalesreturns
K1255.10NETWORK152
B132S 2.34HARDWARE30010
R18KY2 1.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
The following SAS program is submitted:
data hware inter cheap;
set prices(keep = productype price);
if producttype = `HARDWARE' then output hware; else if producttype = `NETWORK' then output
inter; if price le 5.00;
run;
if producttype = `HARDWARE' then output hware; else if producttype = `NETWORK' then output
inter; if price le 5.00;
run;
How many observations does the HWARE data set contain?

 :
1. 0
2. 2
3. 3
4. 4

Correct Answer : Get Lastest Questions and Answer :




Question : The following SAS program is submitted:
How many observations are written to the WORK.SALES data set?
 : The following SAS program is submitted:
1. 0
2. 1
3. 5
4. 60

Correct Answer : Get Lastest Questions and Answer :



Related Questions


Question : The following SAS program is submitted:
proc contents data = sashelp.class varnum; quit;
What does the VARNUM option print?
 : The following SAS program is submitted:
1. a list of variable names
2. the total number of variables
3. Access Mostly Uused Products by 50000+ Subscribers
4. a list of the variables in the order they were created



Question : The following SAS program is submitted:
data test;
set chemists;
itjobcode = `Chem2'
then description = `Senior Chemist';
else description = `Unknown';
run;
The value for the variable JOBCODE is:
JOBCODE
-------------
chem2
What is the value of the variable DESCRIPTION?

  : The following SAS program is submitted:
1. chem2
2. Unknown
3. Access Mostly Uused Products by 50000+ Subscribers
4. '' (missing character value)


Question :

Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?

 :
1. MPG is not a numeric variable.
2. LOAD is not a variable in the data set GT100.
3. Access Mostly Uused Products by 50000+ Subscribers
4. LOAD must be defined prior to the SET statement.


Question : You have been looking a SAS program written by your team mate. However, he has not done formatting of the code.
He has used Proc print , to display data in the output window.
Below is the code, which is written by your team mate. Please find the total number of statement in this code.

proc print data=EmployeeInfo
label double;
var name age salary bonus; where sex='male';
label sex='SEX'; run;

 : You have been looking a SAS program written by your team mate. However, he has not done formatting of the code.
1. three
2. four
3. Access Mostly Uused Products by 50000+ Subscribers
4. six


Question : You have been given below SAS programming statement
Libname Hadoop spss c:\hadoopexam\courses.spss;

 : You have been given below SAS programming statement
1. Above statement is having wrong syntax or half.

2. Above statement is defining two libref pointing to the same data file

3. Access Mostly Uused Products by 50000+ Subscribers

4. It is defining a library named spss using Hadoop sas engine



Question : You are a good SAS programmer, hence whenever you write a program you will follow which of the following
A. Whenever you write a DATA or PROC step, you will always start it with the first column
B. Whatever statements you write inside the step, you should indent it properly.
C. You always write RUN statement as a first column
D. You should prefer multiple statement in single line, separated by semicolon
E. You always assign a new label to column when output generated

 : You are a good SAS programmer, hence whenever you write a program you will follow which of the following
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D,E
5. A,C,E