Premium

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



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;


Correct Answer : Get Lastest Questions and Answer :




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.

Correct Answer : Get Lastest Questions and Answer :




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

Correct Answer : Get Lastest Questions and Answer : Finding the Day of the Week
SAS has various functions that produce calendar dates from SAS date values. SAS date functions enable you to do such things as derive partial date information or use the current date
in calculations. If the final payment for a tour is due 30 days before the tour leaves, then the final payment date can be calculated using subtraction; however, Tradewinds Travel is
closed on Sundays. If the payment is due on a Sunday, then an additional day must be subtracted to make the payment due on Saturday. The WEEKDAY function, which returns the day of
the week as a number from 1 through 7 (Sunday through Saturday) can be used to determine if the return day is a Sunday.
The following statements determine the final payment date by subtracting 30 from the departure date , checking the value returned by the WEEKDAY function , subtracting an additional
day if necessary , DueDate = DepartureDate - 30;
if Weekday(DueDate) = 1 then DueDate = DueDate - 1;
Constructing a data set with these statements produces a list of payment due dates. The following program includes these statements and assigns the format WEEKDATE29. to the new
variable
DueDate: options yearcutoff=1920 pagesize=60 linesize=80 pageno=1 nodate;
data pay;
set mylib.tourdates;
DueDate = DepartureDate - 30;
if Weekday(DueDate) = 1 then DueDate = DueDate - 1;
format DueDate weekdate29.;
run;
proc print data=pay;
var Country DueDate;
title 'Date and Day of Week Payment Is Due';
run;




Related Questions


Question :

The following SAS program is submitted:
proc freq data = class;
tables gender * age / (insert option here);
run;
The following report is created:
The FREQ Procedure
Table of gender by age
Row Column
Gender age Frequency Percent Percent Percent
F 11 11 0.002 0.005 0.00
12 22 0.004 0.004 0.00
13 22 0.004 0.006 6.67
Total 55 0.0010 0.00
M 11 11 0.002 0.005 0.00
12 33 0.006 0.006 0,00
13 11 0.002 0.003 3.33
Total 55 0.001 0 0.00
Total 11 22 0.001 0 0.00
12 55 0.00 10 0.00
13 33 0.00 10 0.00
Total 10 10 0.00
Which option correctly completes the program and creates the report?
 :
1. LIST
2. NOCOLS
3. Access Mostly Uused Products by 50000+ Subscribers
4. NOCROSSTAB


Question :

The value 110700 is stored in a numeric variable named SALARY.
Which FORMAT statement displays the value as $110,700.00 in a report?
  :
1. format salary comma11.2;
2. format salary dollar8.2;
3. Access Mostly Uused Products by 50000+ Subscribers
4. format salary comma8.2 dollar8.2;



Question :

Given the SAS data set EMPLOYEE INFO:
EMPLOYEE_INFO
IDNumber
Expenses
100.00
133.15
234.34
111.12
The following SAS program is submitted:
proc sort data = employee_info;
( insert BY statement here )
run;
Which BY statement completes the program and sorts the data sequentially by ascending expense
values within each ascending IDNUMBER value?

  :
1. by Expenses IDNumber;
2. by IDNumber Expenses;
3. Access Mostly Uused Products by 50000+ Subscribers
4. by ascending IDNumber ascending Expenses;


Question : Which of the following program you see as a syntax error
 : Which of the following program you see as a syntax error
1. data work.prices;
infile '/folders/myfolders/hadoopexam/hesample1.dat';
input CODE $ NAME$ FEE1 FEE2;
if NAME='SPARK;
run;



2. dta work.prices;
infile '/folders/myfolders/hadoopexam/hesample1.dat';
input CODE $ NAME$ FEE1 FEE2;
if NAME='SPARK;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
infile '/folders/myfolders/hadoopexam/hesample1.dat';
input CODE $ NAME$ FEE1 FEE2;
if NAME='SP__;
run;


4. data prices;
infile '/folders/myfolders/hadoopexam/hesample1.dat';
input CODE $ NAME$ FEE1 FEE2;
if NAME='SPARK;
run;



Question : What action should you take once you submitted the below SAS program
proc print data=courses;
where course='SPARK;
run;

 : What action should you take once you submitted the below SAS program
1. After submitting to complete the program add another quotation mark on the log window, so program will be successfully completed

2. Recall the program and add another quotation mark and re-submit the program.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Recall the program, and remove existing quotation and re-submit the program.



Question : You have submitted program in SAS window and active window shows that DATA Step running for long time, what does that mean?

 : You have submitted program in SAS window and active window shows that DATA Step running for long time, what does that mean?
1. There is a spelling error with the SAS keyword

2. You have not provided RUN statement at the end of Data step

3. Access Mostly Uused Products by 50000+ Subscribers

4. Data file is empty