SAS Certification - KU Leuven certification Tips Tricks 17Oct2017.pdf · SAS Certification - KU...

29
10/16/2017 Copyright © 2016, SAS Institute Inc. All rights reserved. 1 Copyright © 2010, SAS Institute Inc. All rights reserved. TIPS AND TRICKS SAS BASE CERTIFICATION EXAM Ilse Scheys SAS Technical Trainer 17/10/2017 KULeuven Copyright © 2016, SAS Institute Inc. All rights reserved. SAS Certification PRACTICAL INFO EXAM CONTENT SAMPLE QUESTIONS Copyright © 2016, SAS Institute Inc. All rights reserved. SAS Certification PRACTICAL INFO EXAM CONTENT SAMPLE QUESTIONS Copyright © 2016, SAS Institute Inc. All rights reserved. Developed according to international standards. SAS offers 8 recognized certifications in: SAS Programming Predictive Modeling Administration Data management Business Intelligence Over 69.000 SAS credentials have been awarded to individuals in 77 countries. WHAT?

Transcript of SAS Certification - KU Leuven certification Tips Tricks 17Oct2017.pdf · SAS Certification - KU...

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .1

Copyright © 2010, SAS Institute Inc. All rights reserved.

TIPS AND TRICKS

SAS BASE CERTIFICATION EXAM

Ilse Scheys

SAS Technical Trainer

17/10/2017

KULeuven

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SAS Certification

PRACTICALINFO

EXAM CONTENT

SAMPLE QUESTIONS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SAS Certification

PRACTICALINFO

EXAMCONTENT

SAMPLE QUESTIONS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• Developed according to international

standards.

• SAS offers 8 recognized certifications in:• SAS Programming

• Predictive Modeling

• Administration

• Data management

• Business Intelligence

• Over 69.000 SAS credentials have been

awarded to individuals in 77 countries.

WHAT?

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .2

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• 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.

• Once you have created or confirmed your PearsonVUE

web account, there is nothing further you need to do.

• You need your PearsonVUE username & password to

participate on the exam

PearsonVUE

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• Instructions

• Paper

• Pen

YOU GET

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• eID

• PearsonVue Username and password

YOU NEED

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

•2 hours time.

• Timer that displays how much time

remains during your exam session.

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .3

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

70 multiple-choice

# of questions

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

1# of questions

per page?

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• Yes!

• Questions can be marked for review

(upper right corner), so at the end you know

which questions you want to go back to.

Can you go

back to

previous

questions in

your exam?

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• No!

• When you quit the application,

(e.g. ctrl+Alt+Del) the exam stops.

• Your score will be 0.

If you go out

of the

application

can you go

back to your

exam?

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .4

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

70%

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• It is calculated and shown immediately

after your exam.

When do you

know your

score?

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• Sent by mail.

How is the

certification

and result

sent?

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

The SAS Global Certification Program now

issues versioned credentials

= your certification does not expire

= it is linked to the current version of SAS

Expiration

date of your

certification

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .5

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

Certification

at KUL

• Date:

Tuesday November 7th 2017

• Time:

16:15 – 18:30

• Place:

VHI 02.09 (pc class H2)

Dekenstraat 2

3000 Leuven

• Registration for the exam is obligatory.

If you wish to take part, send an e mail to

[email protected]

before November 1st.

• Cost for students:

When you participate for the 1st time: free

When you already have participated: € 50.

• Bring your student ID to the exam

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• SAS course (KUL)

• SAS e-learning Programming 1 and Programming 2

• Information session

Practice

• Sample Questions (free - website SAS)

• Flash Cards ( free - website SAS)

• Simulation exam (Toledo)

Preparation

For

Exam

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SAS Certification Website : https://www.sas.com/en_us/certification.html

including

• sample questions (and answers)

• flash cards

Preparation

For

Exam

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

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

Programming Flash Card deck.

You can download the SAS Flash Cards iOS app:

• Download the SAS Flash Cards

• more decks > SAS > SAS Programming to access the deck.

Preparation

For

Exam

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .6

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

• 50 questions

• Correct answers with explanations

Simulation

exam

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SAS Certification

PRACTICAL INFO

EXAM CONTENT

SAMPLE QUESTIONS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

EXAM CONTENT

Topic 1 – Accessing data

Topic 2 – Creating data structures

Topic 3 – Managing data

Topic 4 – Generating reports

Topic 5 – Handling errors

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

TOPIC 1

SAS Data Sets

▪ concatenate

▪ merge

Spreadsheet Data

▪ access an Excel workbook

▪ use a SAS/ACCESS engine (EXCEL, PCFILES, XLSX)

Raw Data

▪ List, column and formatted input

non-standard data

INFILE statement +options (DLM= DSD MISSOVER)

INPUT statement +components (pointer, trailing@)

ACCESSING

DATA

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .7

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

REVIEW OF CONCEPTS

TOPIC 1: ACCESSING DATA

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 1

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 1

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 2

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .8

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 2

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 3

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 3

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 4

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .9

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 4 QUESTION 5

QUESTION 5

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

TOPIC 2 SAS Data Sets

▪ create a permanent/temporary data set

using raw data or SAS data source

Date values

▪ create and manipulate

▪ informats

▪ YEARCUTOFF system option

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

CREATING

DATA

STRUCTURES

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .10

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

REVIEW OF CONCEPTS

TOPIC 2: CREATING DATA STRUCTURES

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 6

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 6

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 7

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .11

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 7

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 8

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 8

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 9

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .12

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 9

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 10

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 10

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

TOPIC 3 PART 1

SAS Libraries

▪ LIBNAME statement

Variable attributes

▪ variable name, length, type

▪ format, label

SORT procedure

Accumulating totals

▪ ASSIGNMENT statement

▪ RETAIN statement

▪ BY statement

▪ First - Last processing

MANAGING

DATA

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .13

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

TOPIC 3PART 2

MANAGING

DATA

Processing data

▪ Conditional:▪ IF THEN ELSE

▪ DO END

▪ SELECT WHEN

▪ Iterative: ▪ DO loops (also nested and conditional)

▪ 1-dim arrays: ARRAY statement, DO loop

Manipulate and convert 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 statementCopy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

REVIEW OF CONCEPTS

TOPIC 3: MANAGING DATA

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 11

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 11

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .14

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 12

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 12

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 13

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 13

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .15

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 14

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 14

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 15

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 15

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .16

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

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

this DO loop execute?

a. 0

b. 1

c. 12

d. 13

data finance.earnings;Amount=1000;Rate=.075/12;do Month=1 to 12;

Earned+(Amount+Earned)*Rate;end;

run;

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

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

this DO loop execute?

a. 0

b. 1

c. 12

d. 13

data finance.earnings;Amount=1000;Rate=.075/12;do Month=1 to 12;

Earned+(Amount+Earned)*Rate;end;

run;

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

value, which in this case is 12.

63

Copy r i gh t © 2012 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

4. In the data set Invest, what would be the stored value

for Year?

a. missing

b. 2008

c. 2012

d. 2013

data invest;do Year=2008 to 2012;

Capital+5000;Capital+(Capital*.03);

end;run;

64

Copy r i gh t © 2012 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

4. In the data set Invest, what would be the stored value

for Year?

a. missing

b. 2008

c. 2012

d. 2013

data invest;do Year=2008 to 2012;

Capital+5000;Capital+(Capital*.03);

end;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.

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .17

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

TOPIC 4

PRINT procedure

▪ VAR, SUM, WHERE, ID, BY statements

Enhance reports

▪ Formats and labels

▪ Titles and footnotes

▪ ODS statement and STYLE= option

System options

Summary reports

▪ FREQ procedure

▪ MEANS procedure

▪ UNIVARIATE procedure

GENERATING

REPORTS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

REVIEW OF CONCEPTS

TOPIC 4: GENERATING REPORTS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 17

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 17

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .18

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 18

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 18

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 19

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 19

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .19

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 20

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 20

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

TOPIC 5

Syntax errors

▪ misspelled keywords

▪ unmatched quotation marks

▪ missing semicolon

▪ invalid options

Data errors

▪ character values stored in a numeric

variable

Logic errors

▪ SAS cannot detect these errors

▪ PUTLOG statement

▪ ERRORS=n system option

HANDLING

ERRORS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

REVIEW OF CONCEPTS

TOPIC 5: HANDLING ERRORS

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .20

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 21

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 21

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 22

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 22

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .21

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 23

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 23

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 24

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 24

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .22

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 25

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 25

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SAS Certification

PRACTICALINFO

EXAM CONTENT

SAMPLE QUESTIONS

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 1

At the start of DATA step processing, during the

compilation phase, variables are created in the

program data vector, and observations are set to:

A. BLANK

B. MISSING

C. 0

D. THERE ARE NO OBSERVATIONS.

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .23

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 1

At the start of DATA step processing, during the

compilation phase, variables are created in the

program data vector, and observations are set to:

A. BLANK

B. MISSING

C. 0

D. THERE ARE NO OBSERVATIONS.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 2

Suppose the YEARCUTOFF= system option is set

to its default value 1920. Which MDY function

creates the date value for January 3, 2020?

A. MDY(1,3,20)

B. MDY(3,1,20)

C. MDY(1,3,2020)

D. MDY(3,1,2020)

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 2

Suppose the YEARCUTOFF= system option is set

to its default value 1920. Which MDY function

creates the date value for January 3, 2020?

A. MDY(1,3,20)

B. MDY(3,1,20)

C. MDY(1,3,2020)

D. MDY(3,1,2020)

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 3

In order for the date values 05MAY1955 and

04MAR2046 to be read correctly, what value must

the YEARCUTOFF= option have?

A. A VALUE BETWEEN 1947 AND 1954, INCLUSIVE

B. 1955 OR HIGHER

C. 1946 OR HIGHER

D. ANY VALUE

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .24

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 3

In order for the date values 05MAY1955 and

04MAR2046 to be read correctly, what value must

the YEARCUTOFF= option have?

A. A VALUE BETWEEN 1947 AND 1954, INCLUSIVE

B. 1955 OR HIGHER

C. 1946 OR HIGHER

D. ANY VALUE

As long as you specify an informat with

the correct field width for reading the

entire date value,

the YEARCUTOFF= option does not

affect date values that have four-digit

years.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 4

What happens when you submit the following

program? PROC SORT DATA=CLINIC.DIABETES;

RUN;

PROC PRINT DATA=CLINIC.DIABETES;

VAR AGE HEIGHT WEIGHT PULSE;

WHERE SEX='F';

RUN;

A. The PROC PRINT step runs successfully, printing observations

in their sorted order.

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.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 4

PROC SORT DATA=CLINIC.DIABETES;

RUN;

PROC PRINT DATA=CLINIC.DIABETES;

VAR AGE HEIGHT WEIGHT PULSE;

WHERE SEX='F';

RUN;

A. The PROC PRINT step runs successfully, printing observations

in their sorted order.

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.

What happens when you submit the following

program?

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 5

If you submit the following program, which output

does it create?

PROC SORT DATA=FINANCE.LOANS OUT=WORK.LOANS;

BY MONTHS AMOUNT;

RUN;

PROC PRINT DATA=WORK.LOANS NOOBS;

VAR MONTHS;

SUM AMOUNT PAYMENT;

WHERE MONTHS<360;

RUN;

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .25

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 5

If you submit the following program, which output

does it create?

PROC SORT DATA=FINANCE.LOANS OUT=WORK.LOANS;

BY MONTHS AMOUNT;

RUN;

PROC PRINT DATA=WORK.LOANS NOOBS;

VAR MONTHS;

SUM AMOUNT PAYMENT;

WHERE MONTHS<360;

RUN;

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 6

Which of the following statements is false

regarding this program?DATA WORK.INVEST;

DO YEAR=1990 TO 2004;

CAPITAL+5000;

CAPITAL+(CAPITAL*.10);

OUTPUT;

END;

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.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 6

Which of the following statements is false

regarding this program?DATA WORK.INVEST;

DO YEAR=1990 TO 2004;

CAPITAL+5000;

CAPITAL+(CAPITAL*.10);

OUTPUT;

END;

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.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 7

Which statement identifies a raw data fileref

Products and specifies that the DATA step read

only records 1-15?

A. INFILE PRODUCTS OBS 15;

B. INFILE PRODUCTS OBS=15;

C. INPUT PRODUCTS OBS=15;

D. INPUT PRODUCTS 1-15;

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .26

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 7

Which statement identifies a raw data fileref

Products and specifies that the DATA step read

only records 1-15?

A. INFILE PRODUCTS OBS 15;

B. INFILE PRODUCTS OBS=15;

C. INPUT PRODUCTS OBS=15;

D. INPUT PRODUCTS 1-15;

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 8

What is the length of the variable Type, as created

in the DATA step below?

A. 5

B. 8

C. 10

D. it depends on the first value of Type

DATA FINANCE.NEWLOAN;

SET FINANCE.RECORDS;

TOTLOAN+PAYMENT;

IF CODE='1' THEN TYPE='FIXED';

ELSE TYPE='VARIABLE';

LENGTH TYPE $ 10;

RUN;

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 8

What is the length of the variable Type, as created

in the DATA step below?

A. 5

B. 8

C. 10

D. it depends on the first value of Type

DATA FINANCE.NEWLOAN;

SET FINANCE.RECORDS;

TOTLOAN+PAYMENT;

IF CODE='1' THEN TYPE='FIXED';

ELSE TYPE='VARIABLE';

LENGTH TYPE $ 10;

RUN;

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 9

Which INPUT statement correctly reads the

character values for modelnumber (1st field) after

the values for item (2nd field)?

A. INPUT +7 ITEM $9. @1 MODELNUMBER $5.;

B. INPUT +6 ITEM $9. @1 MODELNUMBER $5.;

C. INPUT @7 ITEM $9. +1 MODELNUMBER $5.;

D. INPUT @7 ITEM $9 @1 MODELNUMBER 5.;

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .27

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 9

Which INPUT statement correctly reads the

character values for modelnumber (1st field) after the

values for item (2nd field)?

A. INPUT +7 ITEM $9. @1 MODELNUMBER $5.;

B. INPUT +6 ITEM $9. @1 MODELNUMBER $5.;

C. INPUT @7 ITEM $9. +1 MODELNUMBER $5.;

D. INPUT @7 ITEM $9 @1 MODELNUMBER 5.;

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 10

For the observation shown below, what is the result

of the IF-THEN statement?

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

IF STATUS=‘S’ OR ACTION=‘E’ THEN CONTROL=‘STOP’;

A. COUNT=12 CONTROL=GO

B. COUNT=13 CONTROL=STOP

C. COUNT=12 CONTROL=STOP

D. COUNT=13 CONTROL=GO

1

0

6

Status Type Count Action Control

ok 3 12 E Go

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 10

For the observation shown below, what is the result

of the IF-THEN statement?

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

IF STATUS=‘S’ OR ACTION=‘E’ THEN CONTROL=‘STOP’;

A. COUNT=12 CONTROL=GO

B. COUNT=13 CONTROL=STOP

C. COUNT=12 CONTROL=STOP

D. COUNT=13 CONTROL=GO

1

0

7

Status Type Count Action Control

ok 3 12 E Go

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 11

Given the following data set Prodline,

the following SAS program is submitted:

What is the value of increase for observation 2 in

the data set Products?

DATA PRODUCTS;

SET PRODLINE;

IF PRICE > 250;

INCREASE = PRICE * .10;

RUN;

A. 25

B. 50

C. 28.3

D. THE PROGRAM FAILS TO EXECUTE BECAUSE THE

IF STATEMENT IS MISSING A THEN.

ID COLOR PRICE

123 Blue 283

234 Red 250

345 Blue 500

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .28

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 11

Given the following data set Prodline,

the following SAS program is submitted:

What is the value of increase for observation 2 in

the data set Products?

DATA PRODUCTS;

SET PRODLINE;

IF PRICE > 250;

INCREASE = PRICE * .10;

RUN;

A. 25

B. 50

C. 28.3

D. THE PROGRAM FAILS TO EXECUTE BECAUSE THE

IF STATEMENT IS MISSING A THEN.

ID COLOR PRICE

123 Blue 283

234 Red 250

345 Blue 500

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 12

How many variables are created,

given the following submitted SAS program?

DATA EMPLOYEES;

INFILE 'FILE-SPECIFICATION';

INPUT @1 NAME $10.

@15 DATE DATE9

@25 DEPARTMENT $;

RUN;

A. 0

B. 1

C. 3

D. 4

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 12

How many variables are created,

given the following submitted SAS program?

DATA EMPLOYEES;

INFILE 'FILE-SPECIFICATION';

INPUT @1 NAME $10.

@15 DATE DATE9

@25 DEPARTMENT $;

RUN;

A. 0

B. 1

C. 3

D. 4

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 13

Given the following data set EMPLOYEE,

the following SAS program is submitted:

What value does the variable AGE contain when

the name of the employee is “Sue”?

DATA TEST;

INFILE 'EMPLOYEE';

INPUT EMPLOYEE_NAME $ 1-4;

IF EMPLOYEE_NAME = 'Sue'

THEN INPUT AGE 7-8;

ELSE INPUT IDNUM 10-11;

RUN;

A. 30

B. 33

C. 40

D. . (MISSING NUMERIC VALUE)

Ruth 39 11

Jose 32 22

Sue 30 33

John 40 44

10/16/2017

Copy r ig h t © 2016 , SAS Inst i t u t e Inc. Al l r ights reserv e d .29

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

SOLUTION 13

Given the following data set EMPLOYEE,

the following SAS program is submitted:

What value does the variable AGE contain when

the name of the employee is “Sue”?

DATA TEST;

INFILE 'EMPLOYEE';

INPUT EMPLOYEE_NAME $ 1-4;

IF EMPLOYEE_NAME = 'Sue'

THEN INPUT AGE 7-8;

ELSE INPUT IDNUM 10-11;

RUN;

A. 30

B. 33

C. 40

D. . (MISSING NUMERIC VALUE)

Ruth 39 11

Jose 32 22

Sue 30 33

John 40 44

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 14

An input data file has expressions of this form:10222001

Which SAS informat should you use to read these

dates?

A. DATE6.

B. DATE8.

C. MMDDYY6.

D. MMDDYY8.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

QUESTION 14

An input data file has expressions of this form:10222001

Which SAS informat should you use to read these

dates?

A. DATE6.

B. DATE8.

C. MMDDYY6.

D. MMDDYY8.

Copy r i gh t © 2016 , S A S Ins t i tu te Inc . A l l r i gh ts res e rved .

Good luck!

1. Study

2. Review the exam content

3. Make the simulation examLearn from your mistakes

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