Академический Документы
Профессиональный Документы
Культура Документы
Page 1
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
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?
Page 3
Enrol_date
01/03/2005
Termdate
Jun2005
Page 4
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
Page 5
ERROR
11
A) SAS
B) SAS
C) SAS
D) All
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
Page 6
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
Page 7
Page 8
<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
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
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
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
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
Page 11
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)
Page 12
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.);
Page 13
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
Page 14
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
Page 15
Page 16