Enroll for Certified SAS Base course, training by SAS Certified experts. Find job globally with help of digital badge, become Certified SAS Base Programmer, get job placement assistance.
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
SAS Base Programmer Certification Training by Certified Experts
1. A00-211
aspireit.net –SAS Authorized Center
Q 1: Which SAS statement repetitively executes several statements while
the value of Cholesterol is greater than 200?
Options:
A. do cholesterol gt 200;
B. do cholesterol > 200;
C. do while (cholesterol > 200);
D. do while cholesterol > 200;
Answer: C
Q 2: Which of the following statements is false about BY-group processing?
When you use the BY statement with the SET statement,
Options:
A. FIRST. and LAST. identify the first and last observation in each BY group, in that
order.
B. the DATA step automatically creates two variables, FIRST. and LAST., for each
variable in the BY statement.
C. the data sets that are listed in the SET statement must be indexed or sorted by
the values of the BY variable(s).
D. FIRST. and LAST. are stored in the data set.
Answer: D
Q 3: A typical value for the character variable Target is 123,456. Which
statement correctly converts the values of Target to numeric values when
creating the variable TargetNo?
Options:
A. TargetNo=input(target,comma6.);
B. TargetNo=put(target,comma6.);
C. TargetNo=put(target,comma7.);
D. TargetNo=input(target,comma7.);
Answer: D
2. A00-211
aspireit.net –SAS Authorized Center
Q 4: The COMMAw.d informat can be used to read which of the following
values?
Options:
A. all the three
B. $177.95
C. 12,805
D. 18 %
Answer: A
Q 5: Which statement will limit a PROC MEANS analysis to the variables
Boarded, Transfer, and Deplane?
Options:
A. by boarded transfer deplane;
B. var boarded transfer deplane;
C. output boarded transfer deplane;
D. class boarded transfer deplane;
Answer: B
Q 6: When the code shown below is run, what will the file
D:Outputframe.html display?
ods html body='d:outputbody.html'
contents='d:outputcontents.html'
frame='d:outputframe.html';
Options:
A. The file D:Outputcontents.html.
B. The file D:Outputframe.html.
C. It displays no other files.
D. The files D:Outputcontents.htmland D:Outputbody.html.
Answer: D
3. A00-211
aspireit.net –SAS Authorized Center
Q 7: Which SAS statement associates the fileref Crime with the raw data
file C:StatesDataCrime?
Options:
A. filename crime 'c:statesdatacrime';
B. fileref crime 'c:statesdatacrime';
C. filename crime c:statesdatacrime;
D. filename 'c:statesdatacrime' crime;
Answer: A
Q 8: What is wrong with this program?
data perm.update;
infile invent
input Item $ 1-13 IDnum $ 15-19 Instock 21-22
BackOrd 24-25;
total=instock+backord;
run;
Options:
A. missing semicolon on third line
B. incorrect order of variables
C. missing semicolon on second line
D. incorrect variable type
Answer: C
Q 9: Which of the following programs contain a syntax error?
Options:
A. none of the above.
B. proc sort data=sasuser.mysales;
by region;
run;
C. dat sasuser.mysales;
set mydata.sales99;
run;
D. proc print data=sasuser.mysales label;
label region='Sales Region';
run;
4. A00-211
aspireit.net –SAS Authorized Center
Answer: C
Q 10: What happens if 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;
Options:
A. The PROC PRINT step runs successfully, printing observations in their sorted
order.
B. The PROC SORT step generates errors and stops processing, but the PROC PRINT
step runssuccessfully, printing observations in their original (unsorted) order.
C. The PROC SORT step runs successfully, but the PROC PRINT step generates
errors and stops processing.
D. The PROC SORT step permanently sorts the input data set.
Answer: B
Q 11: Given the raw data file FURNITURE:
Options:
A. , (comma)
B. ,(missing numeric value)
C. "±( missing character value
D. table
Answer : C
5. A00-211
aspireit.net –SAS Authorized Center
Q 12: Given the text file COLORS.TXT:
----+----1----+----2----+----
RED ORANGE YELLOW GREEN
BLUE INDIGO PURPLE VIOLET
CYAN WHITE FUCSIA BLACK
GRAY BROWN PINK MAGENTA
The following SAS program is submitted:
data WORK.COLORS;
infile 'COLORS.TXT';
input @1 Var1 $ @8 Var2 $ @;
input @1 Var3 $ @8 Var4 $ @;
run;
What will the data set WORK.COLORS contain?
Options:
6. A00-211
aspireit.net –SAS Authorized Center
Answer: D
Q 13: Provide a line of missing code.
Options:
A. Qtr1 = sum(of month{*});
B. Qtr1 = sum(of month{_ALL_});
C. Qtr1 = sum(of month{3});
D. Qtr1 = month{1} + month{2} + month{3};
Answer: A
Q 14: The following SAS program is submitted:
data WORK.LOOP;
X = 0;
do Index = 1 to 5 by 2;
X = Index;
end;
run;
7. A00-211
aspireit.net –SAS Authorized Center
Upon completion of execution, what are the values of the variables X and
Index in the SAS data set named WORK.LOOP?
Options:
A. X = 5, Index = 7
B. X = 5, Index = 5
C. X = 5, Index = 6
D. X = 3, Index = 5
Answer: A
Q 15: Formatted input can be used to read
Options:
A. standard data in fixed fields
B. standard free-format data
C. nonstandard data in fixed fields
D. both standard and nonstandard data in fixed fields
Answer: D
Q 16: Given the Contents of the raw data file PRODUCT:
----|----10---|----20---|----30
24613 $25.31
The following SAS program is submitted:
data inventory;
infile 'product';
input idnum 5. @10 price;
run;
What is the value of the PRICE variable?
Options:
A. $25.31
B. No value is stored
C. 25.31
8. A00-211
aspireit.net –SAS Authorized Center
D. (missing nrmeric value)
Answer: D
Q 17 : The following SAS program is submitted:
libname temp ‘SAS data library’;
data work.new;
set temp.jobs;
format newdate mmdd10.;
mdate = month(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new; run;
The variable NEWDATE contains the SAS date value for April 15. 2015.
What output is produced
if April 15, 2015 falls on a Friday?
A.
Obs newdate mdate ddate
104/15/2015 4 7
B.
Obs newdate mdate ddate
104/15/2015 4 6
C.
Obs newdate mdate ddate
104/15/2015 APR 7
D.
Obsnewdate mdate ddate
104/15/2015 APR 6
Answer: B
Q 8: The following SAS program is submitted and reads 100 records from a
raw data file:
9. A00-211
aspireit.net –SAS Authorized Center
Which IF statement writes the final observation to the final data set?
Options:
A. if end =1
B. if eof = 0
C. if eof =1
D. if last =0
Answer: C
Q 9: A realtor has two customers. One customer wants to view a list of
homes selling for less than
$60,000. The other customer wants to view a list of homes selling for
greater than $100,000.
Assuming the PRICE variable is numeric, which one of the following PRINT
procedure steps will
select all desired observations?
Options:
A. proc print data = sasuser.houses;
where price lt 60000 or where price gt 100000;
run;
B. proc print data = sasuser.houses;
where price lt 60000;
where price gt 100000;
run;
C. proc print data = sasuser.houses;
where price lt 60000 and price gt 100000;
run;
D. proc print data = sasuser.houses;
where price lt 60000 or price gt 100000;
run;
Answer: D
Q 10: The following program is submitted.
data WORK.TEST;
input Name $ Age;
10. A00-211
aspireit.net –SAS Authorized Center
datalines;
John +35;
run;
Which values are stored in the output data set?
Options:
A.
Name Age
---------------------
John 35
B.
Name Age
-------------------------------------
(missing value) (missing value)
C.
Name Age
---------------------
John (missing value)
D.
The DATA step fails execution due to data errors.
Answer: A