SAS Base Programming for SAS 9 v1.0

Page:    1 / 18   
Exam contains 270 questions

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?

  • A. MPG is not a numeric variable.
  • B. LOAD is not a variable in the data set GT100.
  • C. LOAD is not variable in the data set AIRPLANES.
  • D. LOAD must be defined prior to the SET statement.


Answer : C

Given the raw data file EMPLOYEE:
----I----1 0---I----20---I----30

Ruth 39 11 -

Jose 32 22 -

Sue 30 33 -

John 40 44 -
The following SAS program is submitted:
data test;
infile "˜employee"™;
input employee_name $ 1-4;
if employee_name = "˜Ruth"™ then input idnum 10-11;
else input age 7-8;
run;
What value does the variable IDNUM contain when the name of the employee is "Ruth"?

  • A. 11
  • B. 22
  • C. 33
  • D. (missing numeric value)


Answer : B

The following SAS program is submitted:
data temp.x;
set sasuser.y;
run;
What must be submitted prior to this SAS program for the program to execute successfully?

  • A. A LIBNAME statement for the libref TEMP only must be submitted.
  • B. A LIBNAME statement for the libref SASUSER only must be submitted.
  • C. LIBNAME statements for the librefs TEMP and SASUSER must be submitted.
  • D. No LIBNAME statement needs to be submitted.


Answer : A

The data set RALESTATE has the variable LOCALFEE with a format or 9. and a variable
COUNTRYFEE with a format or 7.;
The following SAS program is submitted:
data history;
format local fee country fee percent6.;
set realestate;
local fee = local fee / 100;
country fee = country fee / 100;
run;
What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?

  • A. LOCALFEE has format of 9. and COUNTRYFEE has a format of 7.
  • B. LOCALFEE has format of 9. and COUNTRYFEE has a format of percent6.
  • C. LOCALFEE has format of percent6. and COUNTRYFEE has a format of percent6.
  • D. The data step fails execution; there is no format for LOCALFEE


Answer : C

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 1 10.00 20.00 50.00
12 2 20.00 40.00 40.00
13 2 20.00 40.00 66.67

Total 5 50.00 100.00 -
M 11 1 10.00 20.00 50.00
12 3 30.00 60.00 60,00
13 1 10.00 20.00 33.33

Total 5 50.00 100.00 -
Total 11 2 20.00 100.00
12 5 50.00 100.00
13 3 30.00 100.00

Total 10 100.00 -
Which option correctly completes the program and creates the report?

  • A. LIST
  • B. NOCOLS
  • C. CROSSLIST
  • D. NOCROSSTAB


Answer : C

The value 110700 is stored in a numeric variable named SALARY.
Which FORMAT statement displays the value as $110,700.00 in a report?

  • A. format salary comma11.2;
  • B. format salary dollar8.2;
  • C. format salary dollar11.2;
  • D. format salary comma8.2 dollar8.2;


Answer : C

Given the raw data file YEARAMT:
----|---10---|---20---|----30
1901 2
1905 1
1910 6
1925 .
1941 1
The following SAS program is submitted:
data coins;
infile "˜yearamt"™;
input year quantity;
<insert statement(s) here>
run;
Which statement(s) completed the program and produced a non-missing value for the variable
TOTQUANTITY in the final observation of the output data set?

  • A. totquantity + quantity;
  • B. totquantity = sum(totquantity + quantity);
  • C. retain totquantity; totquantity = totquantity + quantity;
  • D. retain totquantity0; totquantity = totquantity + quantity;


Answer : ExpensesA

Given the SAS data set EMPLOYEE INFO:

EMPLOYEE_INFO -

IDNumber -
2542
100.00
3612
133.15
2198
234.34
2198
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?

  • A. by Expenses IDNumber;
  • B. by IDNumber Expenses;
  • C. by ascending Expenses IDNumber;
  • D. by ascending IDNumber ascending Expenses;


Answer : B

The following SAS program is submitted:
proc format
value score 1 - 50 = "˜Fail"™
51 - 100 = "˜Pass"™;
run;
proc report data = work.courses nowd;
column exam;
define exam / display format = score.;
run;
The variable EXAM has a value of 50.5.
How will the EXAM variable value be displayed in the REPORT procedure output?

  • A. Fail
  • B. Pass
  • C. 50.5
  • D. . (missing numeric value)


Answer : C

What is the purpose or the MISSOVER option on the INFILE statement?

  • A. It prevents SAS from loading a new record when the end of the current record is reached.
  • B. It enables SAS to scan the input data records until the character string that is specified in the @"˜character-string"™ expression is round.
  • C. It enables SAS to continue to read the next input data record if it does not find values in the current input tine for all the variables in the statement.
  • D. It causes the DATA step to stop processing if an INPUT statement reaches the end of the current record without finding values for all variables in the statement.


Answer : A

The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
What new variables are created?

  • A. JANSALES, FEBSALES and MARSALES
  • B. MONTHLY1, MONTHLY2 and MONTHLY3
  • C. DIFSALES1, DIFSALES2 and DIFSALES3
  • D. DIFF_SALES1, DIFF_SALES2 and DIFF_SALES3


Answer : C

Which statement describes a characteristic of the SAS automatic variable _ERROR_?

  • A. The _ERROR_ variable is added to the program data vector and becomes part of the data set being created.
  • B. The _ERROR variable maintains a count of the number of data errors in a Data step.
  • C. The _ERROR_ variable can only be used in expressions in the DATA step.
  • D. The ERROR_variable contains the number or the observation that caused the data error.


Answer : C

Given the following raw data record:
07Jan2005
Which INFORMAT reads this raw data and stores it as a SAS date value?

  • A. dmy9.
  • B. date9.
  • C. ddMMMyy9.
  • D. ddmmmyyyy9.


Answer : B

Which statement correctly computes the average of four numerical values?

  • A. average = mean(num1, num4);
  • B. average = mean(num1 - num4);
  • C. average = mean(ofnum1 - num4)
  • D. average = mean(num1 num2 num3 num4);


Answer : C

The following SAS program is submitted:
libname temp "˜SAS data library"™;
data temp.sales;
merge temp.sales
work.receipt;
by names;
run;
The input data files are sorted by the NAMES variable:
What is the result?

  • A. The program executes successfully and a temporary SAS data set is created.
  • B. The program executes successfully and a permanent SAS data set is created.
  • C. The program fails execution because the same SAS data set is referenced for both read and write operations.
  • D. The program fails execution because the SAS data sets on the MERGE statement are in two different libraries.


Answer : B

Page:    1 / 18   
Exam contains 270 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy