Premium

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



Question : You have been given below SAS program

data course100 ;
Fee=5000;
FEE_HIKE=0.1;

do month=1 to 12 ;
INCREASE+(FEE+INCREASE)*FEE_HIKE;
iteration+1;
output;
end;
put _all_;
run;

At the end of do loop, where statement put _all_ is written what would be the value hold by variable moth?

 : You have been given below SAS program
1. 11

2. 12

3. Access Mostly Uused Products by 50000+ Subscribers

4. 0

5. Missing


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see in the given program its a do loop. Hence, until loop finishes it will hold last value upto 12. Once, the loop
finishes it will be again incremented by 1 (12+1) which becomes 13 and it will not go inside the loop. So final value become 13.





Question :
The following PROC PRINT output was created immediately after PROC TABULATE output.
Which system options were specified when the report was created?
  :
1. OBS=, DATE, and NONUMBER
2. NUMBER, PAGENO=1, and DATE
3. Access Mostly Uused Products by 50000+ Subscribers
4. none of the above

Ans : 2
Exp : Clearly, the DATE and NUMBER (page number) options are specified. Because the page number on the output is 1, even though PROC TABULATE output was just produced, PAGENO=1
must also have been specified. If you don't specify PAGENO=, all output in the Output window is numbered sequentially throughout your SAS session.



Question :

Which of the following programs correctly references a SAS data set named SalesAnalysis that is stored in a permanent SAS library?

  :
1. data saleslibrary.salesanalysis;
set mydata.quarter1sales;
if sales>100000;
run;
2. data mysales.totals;
set sales_99.salesanalysis;
if totalsales>50000;
run;
3. Access Mostly Uused Products by 50000+ Subscribers
var sales salesrep month;
run;
4. proc freq data=1999data.salesanalysis;
tables quarter*sales;
run;

Ans : 2
Exp : Librefs must be 1 to 8 characters long, must begin with a letter or underscore, and can contain only letters, numerals, or underscores. After you assign a libref, you specify
it as the first level in the two-level name for a SAS file.


Question : You have been given below SAS program, select the statement which is correct

data course100 ;
Fee=5000;
FEE_HIKE=0.1;

do month=1 to 12 ;
INCREASE+(FEE+INCREASE)*FEE_HIKE;
iteration+1;
output;
end;
put _all_;
run;

A. There would be 12 iteration
B. Output statement will help in generating only last observation as an output.
C. Last value hold by month variable will be 13
D. Iteration variable is redundant, and does not help in creating output.

  :
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: There would in total 12 iteration as given do statement stop value.
Yes, there is as such no use of iteration variable. You can remove that statement.
As soon as 12 iterations have finished, next value hold by month variable is 13 and conditions become false which stops the next iteration.





Question : You have been given below SAS program

data course100 ;
Fee=5000;
FEE_HIKE=0.1;

do month=1 to 15 by 3 ;
INCREASE+(FEE+INCREASE)*FEE_HIKE;
iteration+1;
output;
end;
put _all_;
run;

proc print data=course100; run;

How many observation will be in course100 dataset

 : You have been given below SAS program
1. 15

2. 12

3. Access Mostly Uused Products by 50000+ Subscribers

4. 4

5. 6


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see given do statement is started with 1 and incremented by value 3. It should not reach beyond 15.

1+3=4
4+3=7
7+3=10
10+3=13
13+3=16

Hence, upto 13 do statement will be executed which will generate 5 observation. And as soon as index value become 16, condition will be false and
discarded.




Related Questions


Question : The following SAS program is submitted:
The program fails execution due to syntax errors. What is the cause of the syntax error?
 : The following SAS program is submitted:
1. The variable MONTHSALES does not exist.
2. An array cannot be referenced on a KEEP data set option.
3. The KEEP= data set option should be (KEEP = MONTHSALES).
4. The KEEP= data set option should be the statement KEEP MONTHSALES{12}.


Question : Given the SAS data set EMPLOYEES:
EMPLOYEES
NAME SALARY
-------- ------------
Innis 60000
Jolli 50000
Ellis 55000
Liu 45000
The following SAS program is submitted:
proc print data = employees; where name like '_i%'; run; What is contained in the output?
 : Given the SAS data set EMPLOYEES:
1. Liu only
2. Innis and Ellis only
3. Innis, Ellis, and Liu only
4. Innis, Jolli, Ellis, and Liu


Question : Given the SAS data set ONE:
ONE
ObsDte
-------------
109JAN2005
212JAN2005
The following SAS program is submitted:
data two;
set one;
day = (insert expression here);
format dte date9.;
run;
The data set TWO is created:
TWO
ObsDteDay
109JAN20051
12JAN20054
Which expression successfully completed the program and created the variable DAY?
 : Given the SAS data set ONE:
1. day(dte)
2. weekday(dte)
3. dayofweek(dte)
4. datdif(dte,'01jan2005'd,'act/act')


Question : Read the table
Given the SAS data set SASUSER.HOUSES:
Obs style bedrooms baths price sqfeet street
1 CONDO 2 1.5 80050 1200 MAIN
2 CONDO 3 2.5 79350 1300 ELM
3 CONDO 4 2.5 127150 1400 OAK
4 CONDO 2 2.0 110700 1100 FIFTH
5 TWOSTORY 4 3.0 107250 2100 SECOND
6 TWOSTORY 2 1.0 55650 1600 WEST
7 TWOSTORY 2 1.0 69250 1450 NORTH
6 TWOSTORY 4 2.5 102950 2000 SOUTH
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline;
column style price;
where price It 100000;
(insert DEFINE statement here)
define price / mean width = 9 format = dollar12.;
title;
run;
The following output is desired:
styleprice
-------------
CONDO$79,700
TWOSTORY$62550
Which DEFINE statement completes the program and produces the desired output?
 : Read the table
1. define style / width = 9,
2. define style / orderwidth = 9;
3. define style / group width = 9;
4. define style / display width = 9;



Question :
Given the SAS data set WORKAWARDS:
WORK.AWARDS
FNAME POINTS MONTH
----------------------------------
Amy 2 4
Amy 1 7
Gerard 3 3
Wang 3 3
Wang 1 12
Wang 1 8
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
How are the observations sorted
(Select the option from left image)?
 :
1.
2.
3.
4.


Question : The following SAS program is submitted:
libname temp `SAS data library';
data work.new;
set temp.jobs;
format newdate mmddw10.;
mdate = month(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new; run;
The variable NEWDATE contains the SAS date value for April 15. 2005. What output is produced if April
15, 2005 falls on a Friday?

 : The following SAS program is submitted:
1. Obsnewdate mdate ddate
104/15/2005 APR 6
2. Obs newdate mdate ddate
104/15/2005 4 6
3. Obs newdate mdate ddate
104/15/2005 APR 7
4. Obs newdate mdate ddate
104/15/2005 4 7