Sie sind auf Seite 1von 29

10/16/2017

SAS Certification
TIPS AND TRICKS
SAS BASE CERTIFICATION EXAM
PRACTICAL EXAM SAMPLE
INFO CONTENT QUESTIONS
KULeuven

17/10/2017

Ilse Scheys
SAS Technical Trainer
Copyright © 2010, SAS Institute Inc. All rights reserved. C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

• Developed according to international


standards.
SAS Certification • SAS offers 8 recognized certifications in:
• SAS Programming
• Predictive Modeling
WHAT?
• Administration
PRACTICAL EXAM SAMPLE • Data management
INFO CONTENT QUESTIONS
• Business Intelligence

• Over 69.000 SAS credentials have been


awarded to individuals in 77 countries.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
1
10/16/2017

• Create a PearsonVUE web account


• at the latest 5 days before the exam
• Go to www.pearsonvue.com/sas
• Select Create Account.
• Follow the instructions for New User.
• Instructions
• Once you have created or confirmed your PearsonVUE
web account, there is nothing further you need to do.
PearsonVUE YOU GET • Paper
• You need your PearsonVUE username & password to
participate on the exam
• Pen

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

• eID • 2 hours time.


YOU NEED
• PearsonVue Username and password • Timer that displays how much time
remains during your exam session.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
2
10/16/2017

# of questions
70 # of questions
per page? 1
multiple-choice

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

If you go out • No!


Can you go • Yes! of the
back to
application • When you quit the application,
previous • Questions can be marked for review
(upper right corner), so at the end you know
can you go (e.g. ctrl+Alt+Del) the exam stops.
questions in
which questions you want to go back to. back to your
your exam? • Your score will be 0.
exam?

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
3
10/16/2017

When do you

70% know your


score?
• It is calculated and shown immediately
after your exam.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

The SAS Global Certification Program now


How is the issues versioned credentials
Expiration
certification
• Sent by mail. date of your
and result = your certification does not expire
certification
sent?
= it is linked to the current version of SAS

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
4
10/16/2017

• Date:
Tuesday November 7th 2017

• Time:
16:15 – 18:30

• Place: • SAS course (KUL)


VHI 02.09 (pc class H2)
• SAS e-learning Programming 1 and Programming 2
Dekenstraat 2
3000 Leuven Preparation • Information session
Certification
• Registration for the exam is obligatory. For
at KUL If you wish to take part, send an e mail to
Practice
Exam
Eveline.Declercq@kuleuven.be • Sample Questions (free - website SAS)
before November 1st. • Flash Cards ( free - website SAS)
• Simulation exam (Toledo)
• Cost for students:
When you participate for the 1st time: free
When you already have participated: € 50.

• Bring your student ID to the exam

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SAS Certification Webs : Flash Cards

You can access the web version of the deck:


• select this link or copy and paste it into your browser to launch the SAS

SAS Certification Website : https://www.sas.com/en_us/certification.html Programming Flash Card deck.

including You can download the SAS Flash Cards iOS app:
Preparation • sample questions (and answers) Preparation • Download the SAS Flash Cards
• more decks > SAS > SAS Programming to access the deck.
For • flash cards
For
Exam Exam

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
5
10/16/2017

SAS Certification
• 50 questions
Simulation
exam • Correct answers with explanations
PRACTICAL EXAM SAMPLE
INFO CONTENT QUESTIONS

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

EXAM CONTENT TOPIC 1

SAS Data Sets


Topic 1 – Accessing data ▪ concatenate
▪ merge
Topic 2 – Creating data structures
ACCESSING Spreadsheet Data
▪ access an Excel workbook
Topic 3 – Managing data DATA ▪ use a SAS/ACCESS engine (EXCEL, PCFILES, XLSX)

Topic 4 – Generating reports Raw Data


▪ List, column and formatted input
Topic 5 – Handling errors non-standard data
INFILE statement +options (DLM= DSD MISSOVER)
INPUT statement +components (pointer, trailing@)

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
6
10/16/2017

QUESTION 1

REVIEW OF CONCEPTS
TOPIC 1: ACCESSING DATA

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 1 QUESTION 2

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
7
10/16/2017

SOLUTION 2 QUESTION 3

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 3 QUESTION 4

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
8
10/16/2017

SOLUTION 4 QUESTION 5

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 5 TOPIC 2 SAS Data Sets


▪ create a permanent/temporary data set
using raw data or SAS data source

Date values
▪ create and manipulate
CREATING ▪ informats
DATA ▪ YEARCUTOFF system option
STRUCTURES Control Observations & Variables
▪ WHERE, DROP and KEEP statements
▪ DROP=, KEEP= and OBS= options

Export as raw data file


▪ Use FILE and PUT statement
▪ Use EXPORT procedure
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
9
10/16/2017

QUESTION 6

REVIEW OF CONCEPTS
TOPIC 2: CREATING DATA STRUCTURES

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 6 QUESTION 7

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
10
10/16/2017

SOLUTION 7 QUESTION 8

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 8 QUESTION 9

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
11
10/16/2017

SOLUTION 9 QUESTION 10

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 10 TOPIC 3
PART 1

SAS Libraries
▪ LIBNAME statement

Variable attributes
▪ variable name, length, type
MANAGING ▪ format, label

DATA SORT procedure


Accumulating totals
▪ ASSIGNMENT statement
▪ RETAIN statement
▪ BY statement
▪ First - Last processing

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
12
10/16/2017

TOPIC 3 Processing data


PART 2
▪ Conditional:
▪ IF THEN ELSE
▪ DO END
▪ SELECT WHEN

▪ Iterative:
▪ DO loops (also nested and conditional)
REVIEW OF CONCEPTS
▪ 1-dim arrays: ARRAY statement, DO loop TOPIC 3: MANAGING DATA
MANAGING Manipulate and convert data
DATA ▪ Character functions
▪ Numeric functions
▪ PUT and INPUT function

Validate and clean data (topic 4)


▪ FREQ procedure
▪ MEANS procedure
▪ UNIVARIATE procedure
▪ PRINT procedure with WHERE statement
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 11 SOLUTION 11

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
13
10/16/2017

QUESTION 12 SOLUTION 12

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 13 SOLUTION 13

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
14
10/16/2017

QUESTION 14 SOLUTION 14

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 15 SOLUTION 15

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
15
10/16/2017

3. During each execution of the following DO loop, the value of Earned is


3. During each execution of the following DO loop, the value of Earned is calculated and is added to its previous value. How many times does
calculated and is added to its previous value. How many times does this DO loop execute?
this DO loop execute?
a. 0
a. 0
data finance.earnings; b. 1
data finance.earnings;
Amount=1000; Amount=1000;
b. 1 Rate=.075/12; c. 12 Rate=.075/12;
c. 12 do Month=1 to 12; d. 13 do Month=1 to 12;
d. 13 Earned+(Amount+Earned)*Rate; Earned+(Amount+Earned)*Rate;
end; end;
run; run;

The number of iterations is determined by the DO statement’s stop


value, which in this case is 12.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 2 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 2 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

4. In the data set Invest, what would be the stored value 4. In the data set Invest, what would be the stored value
for Year? for Year?
data invest; data invest;
a. missing do Year=2008 to 2012; a. missing do Year=2008 to 2012;
b. 2008 Capital+5000; b. 2008 Capital+5000;
c. 2012 Capital+(Capital*.03); c. 2012 Capital+(Capital*.03);
end; end;
d. 2013 run; d. 2013 run;

The DO loop shown here executes five times. The


initial value for Year is 2008. At the end of the fifth
iteration of the DO loop, the value for Year is
incremented to 2013. Because this value exceeds the
stop value, the DO loop ends. Then, at the bottom of
the DATA step, the current values are written to the
output data set.
63 64

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
16
10/16/2017

TOPIC 4
PRINT procedure
▪ VAR, SUM, WHERE, ID, BY statements

Enhance reports
▪ Formats and labels
REVIEW OF CONCEPTS
TOPIC 4: GENERATING REPORTS
GENERATING ▪ Titles and footnotes

REPORTS ▪ ODS statement and STYLE= option

System options
Summary reports
▪ FREQ procedure
▪ MEANS procedure
▪ UNIVARIATE procedure

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 17 SOLUTION 17

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
17
10/16/2017

QUESTION 18 SOLUTION 18

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 19 SOLUTION 19

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
18
10/16/2017

QUESTION 20 SOLUTION 20

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

TOPIC 5
Syntax errors
▪ misspelled keywords
▪ unmatched quotation marks
▪ missing semicolon
▪ invalid options
REVIEW OF CONCEPTS
TOPIC 5: HANDLING ERRORS
HANDLING Data errors
ERRORS ▪ character values stored in a numeric
variable

Logic errors
▪ SAS cannot detect these errors
▪ PUTLOG statement

▪ ERRORS=n system option


C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
19
10/16/2017

QUESTION 21 SOLUTION 21

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 22 SOLUTION 22

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
20
10/16/2017

QUESTION 23 SOLUTION 23

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 24 SOLUTION 24

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
21
10/16/2017

QUESTION 25 SOLUTION 25

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 1

At the start of DATA step processing, during the


compilation phase, variables are created in the
SAS Certification program data vector, and observations are set to:

A. BLANK
PRACTICAL
INFO
EXAM
CONTENT
SAMPLE
QUESTIONS
B. MISSING
C. 0
D. THERE ARE NO OBSERVATIONS.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
22
10/16/2017

SOLUTION 1 QUESTION 2

At the start of DATA step processing, during the Suppose the YEARCUTOFF= system option is set
compilation phase, variables are created in the to its default value 1920. Which MDY function
program data vector, and observations are set to:
creates the date value for January 3, 2020?

A. BLANK
A. MDY(1,3,20)
B. MISSING
B. MDY(3,1,20)
C. 0
C. MDY(1,3,2020)
D. THERE ARE NO OBSERVATIONS.
D. MDY(3,1,2020)

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 2 QUESTION 3

Suppose the YEARCUTOFF= system option is set In order for the date values 05MAY1955 and
to its default value 1920. Which MDY function 04MAR2046 to be read correctly, what value must
the YEARCUTOFF= option have?
creates the date value for January 3, 2020?

A. MDY(1,3,20) A. A VALUE BETWEEN 1947 AND 1954, INCLUSIVE


B. 1955 OR HIGHER
B. MDY(3,1,20)
C. 1946 OR HIGHER
C. MDY(1,3,2020)
D. ANY VALUE
D. MDY(3,1,2020)

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
23
10/16/2017

SOLUTION 3 QUESTION 4

In order for the date values 05MAY1955 and What happens when you submit the following
program? PROC SORT DATA=CLINIC.DIABETES;
04MAR2046 to be read correctly, what value must RUN;
the YEARCUTOFF= option have? PROC PRINT DATA=CLINIC.DIABETES;
VAR AGE HEIGHT WEIGHT PULSE;
WHERE SEX='F';
RUN;
A. A VALUE BETWEEN 1947 AND 1954, INCLUSIVE A. The PROC PRINT step runs successfully, printing observations
in their sorted order.
B. 1955 OR HIGHER
As long as you specify an informat with B. The PROC SORT step permanently sorts the input data set.
C. 1946 OR HIGHER the correct field width for reading the C. The PROC SORT step generates errors and stops processing, but
entire date value, the PROC PRINT step runs successfully, printing observations
D. ANY VALUE the YEARCUTOFF= option does not in their original (unsorted) order.
affect date values that have four-digit
years. D. The PROC SORT step runs successfully, but the PROC PRINT step
generates errors and stops processing.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 4 QUESTION 5

What happens when you submit the following If you submit the following program, which output
program? PROC SORT DATA=CLINIC.DIABETES; does it create?
RUN;
PROC SORT DATA=FINANCE.LOANS OUT=WORK.LOANS;
PROC PRINT DATA=CLINIC.DIABETES; BY MONTHS AMOUNT;
VAR AGE HEIGHT WEIGHT PULSE; RUN;
WHERE SEX='F';
RUN; PROC PRINT DATA=WORK.LOANS NOOBS;
VAR MONTHS;
A. The PROC PRINT step runs successfully, printing observations SUM AMOUNT PAYMENT;
in their sorted order. WHERE MONTHS<360;
RUN;
B. The PROC SORT step permanently sorts the input data set.
C. The PROC SORT step generates errors and stops processing, but
the PROC PRINT step runs successfully, printing observations
in their original (unsorted) order.
D. The PROC SORT step runs successfully, but the PROC PRINT step
generates errors and stops processing.

C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
24
10/16/2017

SOLUTION 5 QUESTION 6

If you submit the following program, which output Which of the following statements is false
does it create? regarding this program?
PROC SORT DATA=FINANCE.LOANS OUT=WORK.LOANS; DATA WORK.INVEST;
BY MONTHS AMOUNT; DO YEAR=1990 TO 2004;
RUN; CAPITAL+5000;
PROC PRINT DATA=WORK.LOANS NOOBS; CAPITAL+(CAPITAL*.10);
VAR MONTHS; OUTPUT;
SUM AMOUNT PAYMENT; END;
WHERE MONTHS<360; RUN;
RUN;
A. The OUTPUT statement writes current values to the data
set immediately.
B. The last value for Year in the new data set is 2005.
C. The OUTPUT statement overrides the automatic output at
the end of the DATA step.
D. The DO loop performs 15 iterations.
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 6 QUESTION 7

Which of the following statements is false Which statement identifies a raw data fileref
regarding this program? Products and specifies that the DATA step read
DATA WORK.INVEST; only records 1-15?
DO YEAR=1990 TO 2004;
CAPITAL+5000;
CAPITAL+(CAPITAL*.10);
OUTPUT;
END;
RUN; A. INFILE PRODUCTS OBS 15;
A. The OUTPUT statement writes current values to the data B. INFILE PRODUCTS OBS=15;
set immediately.
B. The last value for Year in the new data set is 2005.
C. INPUT PRODUCTS OBS=15;
C. The OUTPUT statement overrides the automatic output at D. INPUT PRODUCTS 1-15;
the end of the DATA step.
D. The DO loop performs 15 iterations.
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
25
10/16/2017

SOLUTION 7 QUESTION 8

Which statement identifies a raw data fileref What is the length of the variable Type, as created
Products and specifies that the DATA step read in the DATA step below?
only records 1-15? DATA FINANCE.NEWLOAN;
SET FINANCE.RECORDS;
TOTLOAN+PAYMENT;
IF CODE='1' THEN TYPE='FIXED';
ELSE TYPE='VARIABLE';
A. INFILE PRODUCTS OBS 15; LENGTH TYPE $ 10;
RUN;
B. INFILE PRODUCTS OBS=15; A. 5
C. INPUT PRODUCTS OBS=15; B. 8
D. INPUT PRODUCTS 1-15; C. 10
D. it depends on the first value of Type
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 8 QUESTION 9

What is the length of the variable Type, as created Which INPUT statement correctly reads the
in the DATA step below? character values for modelnumber (1st field) after
DATA FINANCE.NEWLOAN; the values for item (2nd field)?
SET FINANCE.RECORDS;
TOTLOAN+PAYMENT;
IF CODE='1' THEN TYPE='FIXED';
ELSE TYPE='VARIABLE';
LENGTH TYPE $ 10;
RUN;
A. INPUT +7 ITEM $9. @1 MODELNUMBER $5.;
A. 5
B. INPUT +6 ITEM $9. @1 MODELNUMBER $5.;
B. 8
C. INPUT @7 ITEM $9. +1 MODELNUMBER $5.;
C. 10
D. INPUT @7 ITEM $9 @1 MODELNUMBER 5.;
D. it depends on the first value of Type
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
26
10/16/2017

SOLUTION 9 QUESTION 10

Which INPUT statement correctly reads the For the observation shown below, what is the result
character values for modelnumber (1st field) after the of the IF-THEN statement?
values for item (2nd field)? Status Type Count Action Control
ok 3 12 E Go

IF STATUS=‘OK’ AND TYPE=3 THEN COUNT+1;


IF STATUS=‘S’ OR ACTION=‘E’ THEN CONTROL=‘STOP’;
A. INPUT +7 ITEM $9. @1 MODELNUMBER $5.;
A. COUNT=12 CONTROL=GO
B. INPUT +6 ITEM $9. @1 MODELNUMBER $5.;
B. COUNT=13 CONTROL=STOP
C. INPUT @7 ITEM $9. +1 MODELNUMBER $5.; C. COUNT=12 CONTROL=STOP
D. COUNT=13 CONTROL=GO
D. INPUT @7 ITEM $9 @1 MODELNUMBER 5.;
1
0
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . 6
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 10 QUESTION 11

For the observation shown below, what is the result Given the following data set Prodline,
of the IF-THEN statement? the following SAS program is submitted:
ID COLOR PRICE DATA PRODUCTS;
Status Type Count Action Control 123 Blue 283 SET PRODLINE;
234 Red 250 IF PRICE > 250;
ok 3 12 E Go 345 Blue 500 INCREASE = PRICE * .10;
RUN;
IF STATUS=‘OK’ AND TYPE=3 THEN COUNT+1;
IF STATUS=‘S’ OR ACTION=‘E’ THEN CONTROL=‘STOP’; What is the value of increase for observation 2 in
the data set Products?
A. COUNT=12 CONTROL=GO A. 25
B. COUNT=13 CONTROL=STOP B. 50
C. COUNT=12 CONTROL=STOP C. 28.3
D. COUNT=13 CONTROL=GO D. THE PROGRAM FAILS TO EXECUTE BECAUSE THE
IF STATEMENT IS MISSING A THEN.
1
0
7C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
27
10/16/2017

SOLUTION 11 QUESTION 12

Given the following data set Prodline, How many variables are created,
the following SAS program is submitted: given the following submitted SAS program?
ID COLOR PRICE DATA PRODUCTS;
123 Blue 283 SET PRODLINE; DATA EMPLOYEES;
IF PRICE > 250; INFILE 'FILE-SPECIFICATION';
234 Red 250
INCREASE = PRICE * .10; INPUT @1 NAME $10.
345 Blue 500 @15 DATE DATE9
RUN;
@25 DEPARTMENT $;
RUN;
What is the value of increase for observation 2 in
the data set Products?
A. 0
A. 25
B. 1
B. 50
C. 3
C. 28.3
D. 4
D. THE PROGRAM FAILS TO EXECUTE BECAUSE THE
IF STATEMENT IS MISSING A THEN.
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

SOLUTION 12 QUESTION 13

How many variables are created, Given the following data set EMPLOYEE,
given the following submitted SAS program? the following SAS program is submitted:
DATA TEST;
Ruth 39 11 INFILE 'EMPLOYEE';
DATA EMPLOYEES; Jose 32 22
INFILE 'FILE-SPECIFICATION'; INPUT EMPLOYEE_NAME $ 1-4;
Sue 30 33 IF EMPLOYEE_NAME = 'Sue'
INPUT @1 NAME $10.
@15 DATE DATE9 John 40 44 THEN INPUT AGE 7-8;
@25 DEPARTMENT $; ELSE INPUT IDNUM 10-11;
RUN; RUN;
What value does the variable AGE contain when
A. 0 the name of the employee is “Sue”?
B. 1 A. 30
C. 3 B. 33
D. 4 C. 40
D. . (MISSING NUMERIC VALUE)
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
28
10/16/2017

SOLUTION 13 QUESTION 14

Given the following data set EMPLOYEE,


An input data file has expressions of this form:
the following SAS program is submitted: 10222001
DATA TEST;
Ruth 39 11 INFILE 'EMPLOYEE';
Jose 32 22 INPUT EMPLOYEE_NAME $ 1-4; Which SAS informat should you use to read these
Sue 30 33 IF EMPLOYEE_NAME = 'Sue'
John 40 44 THEN INPUT AGE 7-8;
dates?
ELSE INPUT IDNUM 10-11;
RUN; A. DATE6.
What value does the variable AGE contain when B. DATE8.
the name of the employee is “Sue”? C. MMDDYY6.
D. MMDDYY8.
A. 30
B. 33
C. 40
D. . (MISSING NUMERIC VALUE)
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

QUESTION 14

An input data file has expressions of this form:


10222001

Which SAS informat should you use to read these Good luck!
dates?
1. Study
A. DATE6. 2. Review the exam content
B. DATE8. 3. Make the simulation exam
C. MMDDYY6. Learn from your mistakes
D. MMDDYY8. Revise the topics until you understand them
4. Practice a lot
Trial and error
Check the log
5. Focus points: error handling, PDV, raw data
6. Read the questions carefully
C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d . C o p y r i g h t © 2 0 1 6 , S A S I n s t i t u t e I n c . A l l r i g h t s r e s e r ve d .

C o p y r i g h t © 2 0 1 6 , S AS I n s t i t u t e I n c . Al l r i g h t s r e s e r v e d .
29

Das könnte Ihnen auch gefallen