BA05 Base SAS Programming Assessment 2

WARNING - Clicking on the "SUBMIT ASSIGNMENT" button will submit the

Assignment. Be sure that you have reviewed your answers before clicking it.

Subject Code: BA05

Subject Name: BASE SAS PROGRAMMING

Component name:

ASSIGNMENT2

Question 1:- Which of the clauses below correctly sorts rows by the values of the columns Price and SqFeet ? a) order price, sqfeet

b) order by price, sqfeet

c) sort by price sqfeet

d) sort price sqfeet

Question 2:- In SAS date is ___ variable:

a) numeric

b) string

c) both numeric and string

d) none of the above

Question 3:- Which of the following is the pre-requisite of merge

a) sorted data

b) sorted data by ID variable

c) data with no missing values

d) none of the above

Question 4:- Find out the wrong statement in the syntax:

a) data class01.class2;

b) set class01.class;

c) where name = Alfred;

d) run;

Question 5:- The data set Survey, Health includes the following variables. Which is a poor candidate for PROC MEANS analysis?

a) IDnum

b) Age

c) Height

d) Weight

Question 6:- noobs` option is consistent with:

a) proc sql

b) proc ttest

c) proc univariate

d) proc print

/

Question 7:- The SAS data set EMPLOYEE_INFO is listed below: IDNumber Expenses 2542 100.00 3612 133.15 2198 234.34 2198 111.12 The following SAS program is submitted: proc sort data = employee_info; run; Which one of the following BY statements completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value?

by Expenses IDNumber; by IDNumber Expenses;

by ascending (IDNumber Expenses);

by ascending IDNumber ascending Expenses

Question 8:- Which of the following keywords is used in SAS to store values in variables

Input

Data

Datalines

Run

Question 9:- Which one of the following statement can’t be part of “PROC FREQ

Output

Weight

Set

Tables

Question 10:- Which of the following are correct PROC statements

PROC contents

PROC means PROC freq

All of the above

Question 11:- Which of the following keywords is used to define the variables in SAS Dataset

Assign

Create

Input

Data

Question 12:- What is the name of the input data set in the program below? data work.us; set orion.sales; where

Country=`US`; run;

work.us orion.sales

country

sales

Question 13:- The data set Brio.sales contains nine variables. Given this DATA step, how many variables does the descriptor portion of work.comp contain? data work.comp; set Brio.sales; drop Gender Salary Birth_Date; run;

6

7

8

Question 14:- Which procedure can be used to view the permanent labels and formats stored in a data set? a) PROC PRINT

b) PROC FORMAT

c) PROC CONTENTS

d) PROC UNIVARIATE

Question 15:- Which DATA step ensures that all observations are assigned a non-missing value for Bonus

a) data work.bonus;set orion.sales;if Country=`US` then Bonus=500;else if Country=`AU` thenBonus=300;run:

b) data work.bonus;set orion.sales;if Country=`US` then Bonus=500;else Bonus=300;run:

Question 16:- Which of the following programs concatenates the data sets sales and products, in that order a) date newsales;set products sales;run;

b) date newsales;set sales products;run;

c) date newsales;set sales;set products;run;

Question 17:- If you run this DATA step, what observations does the dataset bonuses contain? data bonuses; merge managers (in=M) staff (in=S); by EmpID; if M=0 and S=1; run;

a) Only the observations from staff that have no match in managers.

b) Only the observations from managers that have no match in staff

c) All observations from both managers and staff, whether or not they match d) No observations

Question 18:- Which of the following is a valid name for a character format? a) Country

b) $ctry

c) @country

d) _country

Question 19:- You have executed following SAS DATA step as on Monday, April 01, 2000. data joiners; set joinee; join_date = today(); run;

a) This will be a character string with the value `04/01/2000`

b) This will be a character string with the value `Monday, April 01, 2000`

c) This will be a numeric value 14701, representing the SAS date for April 01, 2000

d) This will be a numeric value 04252000, representing the SAS date for April 01, 2000

Question 20:- The following SAS program is submitted: data test; infile `file specification`; input name $ amount@@; run; Which of the following is true?

a) Two @@ together are the same as one c

b) Two @@ hold the data records until the bottom of the DATA step.

c) Two @@ hold the raw data record across iterations of the DATA step.

d) Two @@ are invalid syntax and will cause the program to fail to execute.


Want latest solution of this assignment

Want to order fresh copy of the Sample Template Answers? online or do you need the old solutions for Sample Template, contact our customer support or talk to us to get the answers of it.