Вы находитесь на странице: 1из 16

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION


Each carry 1 mark, carries 0.25 negative marking.

1) How many of the following data sets are temporary datasets?


A) Work.employee
B) Prac.employee
C) Base1.employee
D) Employee
2) Which program has the correct syntax for DATA step?
A) Data student
Input no name $;
1 xyz
2 abc
;
Run;
B) dta student;
input no name;
1 xyz
2 abc
;
Run;
C) data student;
input no name $;
datalines;
1 xyz
3 abc
;
Run;
3) The following program submitted.
Proc print data = student;
Title1 Student data;
Title2 Student of 1st Year;
Title3 Marks of 1st exam;
Test Code ep/Base/A00-211
Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 1

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

Run;
Proc print data = student;
Title2 Marks of annual exam;
Run;
What title appear in the second procedure?
A) Marks of annual exam
B) Student data
Student of 1st year
Marks of 1st year
C) Student data
Marks of annual exam
D) Student data
Marks of 1st exam
Marks of annual exam
4) The following program submitted.
Proc print data = employee;
Footnote1 Employee data;
Footnote2 Annual salary report;
Footnote3 confidential;
Run;
Proc print data = employee;
Footnote2 Quarterly salary data;
Run;
A) Employee data
Quarterly salary data
B) Quarterly salary data
C) Employee data
Annual salary report
Confidential
D) Employee data
Quarterly salary data
Confidential
5) Proc print data = student;
Label LN = Last Name
FN = First Name;
Test Code ep/Base/A00-211
Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 2

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

Run;
Which option will be used with proc print to print the label in output window?
A) Label
B) Now
C) Print
D) Split
6) How many statements are in the DATA Step?
Data emp;
Length First_name $ 13
Last_Name $ 20 Salary Jobcode $ 20;
Infile raw-data-file;
Input First_name $ Last_Name $ salary Jobcode $;
Run;

7)

8)

9)

10)

A) 1
B) 5
C) 7
D) 3
Proc contents data = donations;
Run;
What output would you get?
A) Descriptor portion
B) Data portion
C) Both descriptor and data portion
Which of the following is not a valid WHERE expression?
A) Where gender = M;
B) Where salary ^= 23000;
C) Where city in ( Ahmedabad Baroda);
D) Where salary between 15000 and 30000;
Where name like C_t%;
Which names will be selected based on the above expression?
A) Cat
B) Cattle
C) Camel
D) Cats
Which where statement correctly subsets for character days Sunday, Monday or Tuesday and
numeric number with a missing value?

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 3

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

A) Where days in (Sunday, Monday, Tuesday) and number = .;


B) Where days in (Sunday, Monday, Tuesday) and number = ;
C) Where days in(Sunday- Tuesday) and number = . ;
11) Which FORMAT statement creates the output?
Birthdate
20/05/1980

Enrol_date
01/03/2005

Termdate
Jun2005

A) Format birthdate enrol_date mmddyy8. Trem_date mmyy7.;


B) Format birthdate enrol_date ddmmyy10. Term_date monyy7.;
C) Format birthdate enrol_date ddmmyyyy. Term_date mmmyyyy.;
12) Which statement is true regarding compilation phase?
A) Data is read directly from the raw data file to PDV.
B) At the bottom of the DATA step, the contents of the PDV are output to the output SAS data
set.
C) When SAS returns to the top of the DATA step, any variable coming from a SAS data set is
set to missing.
13) Complete the following syntax.
PROC FREQ DATA = sas-data-set__________;
_________________;
Run;
A) Nlevel, table;
B) Nlevels, tables;
C) Var;
D) Where;
14) What is the result of the assignment statement given the values of a and b?
C = a+b/2;
Where a= . and b=19;
A) 5
B) 10
C) 0
D) . (missing)
15) What is the result of the assignment statement given the value of num1 and num2?
Num3 = (5+15)/2; where num1=5 and num2=15;
A) 10
B) . (missing)
Test Code ep/Base/A00-211
Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 4

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

C) 0
D) 5
16) To suppress page number and date from output window, which options will you use in options
statement?
A) Nonumber
B) Nodate
C) Both A & B
D) Nopageno
17) The SAS data set admit has 4 variables ID, AGE, HEIGHT, SEX.
Work.admit
ID
2462
2666
2302
2501

Age
31
29
43
30

Height
66
61
71
67

Sex
F
M
M
F

Proc print data = admit;


Var id age height;
Where age>= 30;
Run;
How many variables and observations are in the output data set?
A) 3 variables, 4 observations
B) 2 variables, 3 observations
C) 4 variables, 2 observations
D) 4 variables, 3 observations
18) Which time span is used to interpret two digit year values if the YEARCUTOFF = option is set to
be 1960?
A) 1960-2060
B) 1960-2059
C) 1959-2061
D) 1960-2001
19) What does the following log indicate above your program?
proc print data=sashelp.class
var name sex age;
22
76
ERROR 22-322: Syntax error, expecting one of the

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 5

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION


following:

ERROR
11
A) SAS
B) SAS
C) SAS
D) All

;, (, DATA, DOUBLE, HEADING, LABEL,


N, NOOBS, OBS, ROUND, ROWS, SPLIT, STYLE,
UNIFORM, WIDTH.
76-322: Syntax error, statement will be ignored.
run;
identifies a syntax error at the position of the VAR statement
is reading VAR as an option in the PROC PRINT statement.
has stopped processing the program because of errors.
of the above

20) The SAS dataset patient contains 4 variables AGE, HEIGHT, WEIGHT, FEE.
Work.patient data set is as follow.
Age
Height Weight Fee
31
61
123
149.75
41
65
137
124.80
21
63
123
149.75
51
71
141
124.80
44
66
141
149.75
If you run the following program, w hat will be the output?
Proc sort data = patient;
By weight age;
Run;
Proc print data = patient noobs;
Run;
A) Age height
21
63
31
61
41
65
44
66
51
71
B) Age height
21
63
31
61
41
65
51
71
44
66

weight
123
123
137
141
141
weight
123
123
137
141
141

fee
149.75
149.75
124.80
149.75
124.80
fee
149.75
149.75
124.80
124.80
149.75

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 6

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

C) Age
31
21
44
41
51

height
61
63
66
65
71

weight
123
123
141
137
141

fee
149.75
149.75
149.75
124.80
124.80

21) Which PROC PRINT step below creates the following output?
Work.flights
Date
On
Changed Flight
03Feb98 231
19
302
04Feb98 161
5
302
05Feb98 214
14
302
06Feb98 212
9
302
07Feb98 167
11
302
A) proc print data=flights noobs;
var on changed flight;
where on>=160;
run;
B) proc print data=flights;
var date on changed flight;
where changed<3;
run;
C) proc print data=flights label noobs;
var

date boarded transferred flight;

label boarded='On' transferred='Changed';


where flight='302';
run;
D)proc print flights noobs;
id date;
var date on changed flight;
where flight='219';
run;

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 7

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION


22) librefs remain in effect until
A) You change them.
B) You cancel them.
C) You end your SAS session.
D) All of the above
23)Which of the following is not created during compilation phase?
A) the data set descriptor
B) the first observation
C) the program data vector
D) the _N_ and _ERROR_ automatic variables
24)What is wrong with this program?
Data prog.update;
Infile inventory.dat
Input item $ 1-13 idnum $ 15-19 instock 21-22 backorder 24-25;
Total = instock + backorder;
Run;
A) missing semicolon on second line
B) missing semicolon on third line
C) incorrect order of variables
D) incorrect variable type
25) If you dont specify the LIBRARY = option, your formats are stored in
work.formats, and they exist
A) only for current procedure
B) only for current DATA Step.
C) only for the current SAS session.
D) Permanently
26) How many characters can be used in a label?
A) 50
B) 96
C) 203
D) 256
27) The data set employees includes the following variables. Which is a poor
variable for PROC MEANS analysis?
A) empid

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 8

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION


B) salary
C) bonus
D) age
28) Which PROC FREQ step produced this table?
Percent

Table of Sex by Weight


Weight
Sex

<140

140-180

>180

Total

11.00

44.00

0.00

55.00

0.00

4.00

41.00

45.00

Total

20

11.00

48.00

41.00

100.00

A) proc freq data=diabetes;


tables sex weight / list;
format weight wtfmt.;
run;
B) proc freq data=diabetes;
tables sex*weight / nocol;
format weight wtfmt.;
run;
C) proc freq data=diabetes;
tables sex weight / norow nocol;
format weight wtfmt.;
run;
D)proc freq data=diabetes;
tables sex*weight / nofreq norow nocol;
format weight wtfmt.;
run;

29)How many of the following data sets are permanent data sets?
A) Work.student
B) Temporary.student
C) Student
Test Code ep/Base/A00-211
Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 9

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

D) Sasprac.student

30)The dataset work.productsale has 5 variables Actualsale, Predictedsale country, quarter, and year.
The data work.productsale as follow.
Actualsale
Predictedsale
925
890
608
846
948
486
353
266
101
217
561
979

Country
Canada
Canada
US
Canada
US
US

Quarter
1
1
2
3
4
3

Year
1993
1993
1994
1994
1993
1994

Proc means data = productsale min max n maxdec=2 nonobs;


Var actualsale ;
Class country;
Run;
What will be the output of above program?
A) Country
Minimum Maximum
N
US
101.00
948.00
3
Canada
353.00
925.00
3
B) Country
Minimum Maximum
N
Canada
101.00
948.00
3
US
353.00
925.00
3
C) Country
N obs Minimum Maximum
N
US
3
101.00
948.00
3
Canada
3
353.00
925.00
3
31)Using ODS statements, how many types of output can you generate concurrently?
A)
B)
C)
D)

Only listing output


2
3
As many as you want

32)What is the length of the variable Dept, as created in the DATA step below?
Test Code ep/Base/A00-211
Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 10

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

Data work.emp;
Set bank.employee;
Salary + bonus;
If jobcode = S then dept = Sales;
Else dept = Account;
Length dept $ 12;
Run;
A) 5
B) 7
C) 12
D) 8
33)Consider the IF-THEN statement shown below. When the statement is executed, which expression
is evaluated first?
If marks>=94
And (research = A or (project = A and Present = A))
Then grade = A++;
A) Marks>=94
B) Research = A
C) Project = A and present = A
D) Research = A or (project = A and present = A)
34)If you submit the following program, which variables appear in the new data set?
Data work.emp(drop = age hiredate);
Set bank.employee(keep = age hiredate salary);
If salary >15000 and age > 40;
Run;
A) None
B) Salary
C) Age salary
D) Age hiredate salary
35) Which data step will use to combine work.one and work.two to produce work.three?
Work.one
no

name

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 11

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

1
3
5

Apple
Orange
Banana

Work.two
No
Name2
2
Mango
4
Lichi
Work.three
Obs
1
2
3
4
5

No
1
3
5
2
4

Name
Apple
Orange
Banana

Name2

Mango
Lichi

A) Data work.three;
Set one two;
Run;
B) Data fruit.three;
Set one two;
Run;
C) Data work.three;
Merge one two;
By name;
Run;
36)Which function calculates the average of the variables var1, var2, var3, and var4?
A)
B)
C)
D)

Mean(var1, var2)
Mean(var1-var4)
Mean(of var1, var4)
Mean(of var1-var4)

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 12

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

37)A typical value for the character variable Target is 654,321. Which statement correctly converts
the values of Target to numeric values when creating the variable TargetNo?
A)
B)
C)
D)

TargetNo=input(target,comma6.);
TargetNo=input(target,comma7.);
TargetNo=put(target,comma6.);
TargetNo=put(target,comma7.);

38)Which statement is false regarding DO UNTIL statements?


A)The condition is evaluated at the top of the loop, before the enclosed statements are executed.
B)The enclosed statements are always executed at least once.
C)SAS statements in the DO loop are executed until the specified condition is true.
D)The DO loop must have a closing END statement.
39) How many observations will the data set work.earning contain?
Data work.earning;
Value = 3000;
Do year = 1 to 30;
Interest = value *0.70;
Value + interest;
Output;
End;
Run;
A)0
B)1
C) 19
D) 30
40) Which statement is false regarding an ARRAY statement?
Test Code ep/Base/A00-211
Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 13

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

A) It is an executable statement.
B) It can be used to create variables.
C) It must contain either all numeric or all character elements.
D) It must be used to define an array before the array name can be referenced.
41) Finish the ARRAY statement below to create temporary array elements that have initial values of
9100, 9300, 9600, and 9900.
array goal{4} ... ;
A)_temporary_ (9100 9300 9600 9900)
B)temporary (9100 9300 9600 9900)
C)_temporary_ 9100 9300 9600 9900
D)(temporary) 9100 9300 9600 9900
42) What belongs within the braces of this ARRAY statement?
Array subject{?} sub1-sub3;
A)
B)
C)
D)

Subject
Subject*
3
1-3

43) Formatted input can be used to read


A) standard free-format data.
B)Standard data in fixed fields
C) nonstandard data in fixed fields.
D) both standard and nonstandard data in fixed fields.
44) An input data file has date expressions in the form 11232009. Which SAS informat should you use to
read these dates?

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 14

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

A) DATE6.
B) DATE8.
C)MMDDYY6.
D)MMDDYY8.
45) Which pointer control is used to read records non-sequentially?
A) @n
B)#n
C)+n
D)/
46) A record that is being held by a single trailing at sign (@) is automatically released when
A) The input pointer moves past the end of the record.
B) The next iteration of the DATA step begins.
C) Another input statement that has a single trailing at sign (@) executes.
D) Another value is read from the observation.
47) What is the default value of the YEARCUTOFF = System option?
A)1910
B)1900
C)1920
D)1930

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 15

EPOCH RESEARCH INSTITUTE (GUJ) PVT. LTD.

BASE SAS CERTIFICATION EXAM SOLUT ION

Fill in the blanks.


1) The SUM statement is automatically set to __ZERO_ before SAS reads the first observation.
2) In BY-Group processing, the FIRST.variable is set to __1_ when an observation is the first in a
by group; otherwise, it equals 0.
3) The SORT procedure produces only an __OUTPUT__ data set, but no _REPORT__.
4) The __BY__statement specifies the sorting variables.
5) The ___FIRSTOBS=___ data set option specifies a starting point and ___OBS=__ Dataset
option specifies an ending point for processing an input data set.
6) SAS steps begin with either __DATA_ or __PROC_.
7) The ___Datalines__ statement is used when reading data located directly in the program.
8) The __CONTENTS__ procedure displays the descriptor portion of a SAS data set.
9) ___NUMERIC__ variable type is used by SAS to store date values?
10) SAS variable names must start with __LETTER__ or __UNDERSCORE__.
11) Every SAS statement ends with a __SEMICOLON__.
12) By default, numeric variables are stored in__8__ bytes of storage.
13) A missing numeric values is displayed as a __PERIOD__.
14) A libref name must be _8__ characters or less.
15) The SET statement can read __TEMPORARY__ or __PERMANENT__ data sets.
16) __FORMATTED__ input, you can read nonstandard data for which SAS require additional
instructions.
17) To read with list input, data values must be separated with a _DELIMITER__.
18) The _SET__ statement cannot be used to select records from a raw data file.
19) During the processing of every DATA step, SAS automatically creates _ERROR_ and _N_
temporary variables.
20) The __APPEND__ procedure adds the observations from one SAS data set to the end of
another SAS data set.
21) In PROC MEANS, use a __VAR__ statement to limit output to relevant variables.
22) ___FORWARD SLASH (/)___ pointer control is used to read multiple records sequentially.
23) The _DOUBLE TRAILING (@@)_ at sign holds a record across multiple iterations of the DATA
Step until the end of the record is reduced,

Test Code ep/Base/A00-211


Author: Krishna Nanavaty
Version No: ep/No.001/18th Jan 2010

Page 16

Вам также может понравиться