You are on page 1of 14

EPOCHRESEARCHINSTITUTE(GUJ)PVT.LTD.

BASESASCERTIFICATIONEXAM
NameofStudent:______________________________
TestTakenBy:______________________________

TestDate:______________________________________ TotalMarks:_________________________________

Score:__________________________________________

Instruction:
Pleasereadquestioncarefullybeforeyouattemptit.
Totalmarks:70(Eachcarry1mark,andcarries0.25negativemarkingsystem.)
Passingpercentage:65%
TotalTime:2Hours

1) Howmanyofthefollowingdatasetsaretemporarydatasets?
A) Work.employee
B) Prac.employee
C) Base1.employee
D) Employee
2) WhichprogramhasthecorrectsyntaxforDATAstep?
A) Datastudent
Inputnoname$;
1 xyz
2 abc
;
Run;
B) dtastudent;
inputnoname;
1 xyz
2 abc
;
Run;
C) datastudent;
inputnoname$;
datalines;
1xyz
3 abc
;
Run;

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page1


3) Thefollowingprogramsubmitted.
Procprintdata=student;
Title1Studentdata;
Title2Studentof1stYear;
Title3Marksof1stexam;
Run;
Procprintdata=student;
Title2Marksofannualexam;
Run;
Whattitleappearinthesecondprocedure?
A) Marksofannualexam
B) Studentdata
Studentof1styear
Marksof1styear
C) Studentdata
Marksofannualexam
D) Studentdata
Marksof1stexam
Marksofannualexam

4) Thefollowingprogramsubmitted.
Procprintdata=employee;
Footnote1Employeedata;
Footnote2Annualsalaryreport;
Footnote3confidential;
Run;

Procprintdata=employee;
Footnote2Quarterlysalarydata;
Run;
A) Employeedata
Quarterlysalarydata
B) Quarterlysalarydata
C) Employeedata
Annualsalaryreport
Confidential
D) Employeedata
Quarterlysalarydata
Confidential

5) Procprintdata=student;
LabelLN=LastName
FN=FirstName;
Run;
Whichoptionwillbeusedwithprocprinttoprintthelabelinoutputwindow?
A) Label
B) Now
C) Print
D) Split
TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page2

6) HowmanystatementsareintheDATAStep?

Dataemp;
LengthFirst_name$13
Last_Name$20SalaryJobcode$20;
Infilerawdatafile;
InputFirst_name$Last_Name$salaryJobcode$;
Run;

A) 1
B) 5
C) 7
D) 3
7) Proccontentsdata=donations;
Run;
Whatoutputwouldyouget?
A) Descriptorportion
B) Dataportion
C) Bothdescriptoranddataportion

8) WhichofthefollowingisnotavalidWHEREexpression?
A) Wheregender=M;
B) Wheresalary^=23000;
C) Wherecityin(AhmedabadBaroda);
D) Wheresalarybetween15000and30000;

9) WherenamelikeC_t%;
Whichnameswillbeselectedbasedontheaboveexpression?
A) Cat
B) Cattle
C) Camel
D) Cats

10) WhichwherestatementcorrectlysubsetsforcharacterdaysSunday,MondayorTuesday
andnumericnumberwithamissingvalue?
A) Wheredaysin(Sunday,Monday,Tuesday)andnumber=.;
B) Wheredaysin(Sunday,Monday,Tuesday)andnumber=;
C) Wheredaysin(SundayTuesday)andnumber=.;

11) WhichFORMATstatementcreatestheoutput?

Birthdate
Enrol_date
Termdate
20/05/1980
1/03/2005
June2005

A) Formatbirthdateenrol_datemmddyy8.Trem_datemmyy7.;
B) Formatbirthdateenrol_dateddmmyy10.Term_datemonyy7.;
C) Formatbirthdateenrol_dateddmmyyyy.Term_datemmmyyyy.;
TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page3

12) Whichstatementistrueregardingcompilationphase?
A) DataisreaddirectlyfromtherawdatafiletoPDV.
B) AtthebottomoftheDATAstep,thecontentsofthePDVareoutputtotheoutputSAS
dataset.
C) WhenSASreturnstothetopoftheDATAstep,anyvariablecomingfromaSASdataset
issettomissing.

13) Completethefollowingsyntax.
PROCFREQDATA=sasdataset__________;
_________________;
Run;
A) Nlevel,table;
B) Nlevels,tables;
C) Var;
D) Where;

14) Whatistheresultoftheassignmentstatementgiventhevaluesofaandb?
C=a+b/2;
Wherea=.andb=19;
A) 5
B) 10
C) 0
D) .(missing)

15) Whatistheresultoftheassignmentstatementgiventhevalueofnum1andnum2?
Num3=5+15/2;
A) 10
B) .(missing)
C) 0
D) 5

16) Tosuppresspagenumberanddatefromoutputwindow,whichoptionswillyouusein
optionsstatement?
A) Nonumber
B) Nodate
C) BothA&B
D) Nopageno

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page4


17) TheSASdatasetadmithas4variablesID,AGE,HEIGHT,SEX.
Work.admit

ID
Age Height Sex
2462 31 66
F
2666 29 61
M
2302 43 71
M
2501 30 67
F

Procprintdata=admit;
Varidageheight;
Whereage>=30;
Run;
Howmanyvariablesandobservationsareintheoutputwindow?
A) 3variables,4observations
B) 2variables,3observations
C) 4variables,2observations
D) 4variables,3observations

18) WhichtimespanisusedtointerprettwodigityearvaluesiftheYEARCUTOFF=optionis
settobe1960?
A) 19602060
B) 19602059
C) 19592061
D) 19602001

19) Whatdoesthefollowinglogindicateaboveyourprogram?
proc print data=sashelp.class
var name sex age;
22
76
ERROR 22-322: Syntax error, expecting one of the
following:
;, (, DATA, DOUBLE, HEADING, LABEL,
N, NOOBS, OBS, ROUND, ROWS, SPLIT, STYLE,
UNIFORM, WIDTH.
ERROR 76-322: Syntax error, statement will be ignored.
11
run;
A) SAS identifies a syntax error at the position of the VAR statement
B) SAS is reading VAR as an option in the PROC PRINT statement.
C) SAS has stopped processing the program because of errors.
D) All of the above

20) TheSASdatasetpatientcontains4variablesAGE,HEIGHT,WEIGHT,FEE.
Work.patientdatasetisasfollow.
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
TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page5

Ifyourunthefollowingprogram,whatwillbetheoutput?
Procsortdata=patient;
Byweightage;
Run;
Procprintdata=patientnoobs;
Run;

A) Ageheightweightfee
2163123149.75
3161123149.75
4165137124.80
4466141149.75
5171141124.80
B) Ageheightweightfee
2163123149.75
3161123149.75
4165137124.80
5171141124.80
4466141149.75
C) Ageheightweightfee
3161123149.75
2163123149.75
4466141149.75
4165137124.80
5171141124.80

21) WhichPROCPRINTstepbelowcreatesthefollowingoutput?
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) roc 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;

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page6


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

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page7

27) The data set employees includes the following variables. Which is a
poor variable for PROC MEANS analysis?
A) empid
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)Howmanyofthefollowingdatasetsarepermanentdatasets?
A)
B)
C)
D)

Work.student
Temporary.student
Student
Sasprac.student

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page8

30)Thedatasetwork.productsalehas5variablesActualsale,Predictedsalecountry,quarter,and
year.
Thedatawork.productsaleasfollow.
Actualsale
Predictedsale
Country
Quarter
925
890
Canada
1
608
846
Canada
1
948
486
US
2
353
266
Canada
3
101
217
US
4
561
979
US
3

Procmeansdata=productsaleminmaxnmaxdec=2nonobs;
Varactualsale;
Classcountry;
Run;
Whatwillbetheoutputofaboveprogram?
A) CountryMinimumMaximumN
US101.00948.003
Canada353.00925.003
B) CountryMinimumMaximumN
Canada101.00948.003
US353.00925.003
C) CountryNobsMinimumMaximumN
US3101.00948.003
Canada3353.00925.003

Year
1993
1993
1994
1994
1993
1994

31)UsingODSstatements,howmanytypesofoutputcanyougenerateconcurrently?
A) Onlylistingoutput
B) 2
C) 3
D) Asmanyasyouwant
32) WhatisthelengthofthevariableDept,ascreatedintheDATAstepbelow?
Datawork.emp;
Setbank.employee;
Salary+bonus;
Ifjobcode=Sthendept=Sales;
Elsedept=Account;
Lengthdept$12;
Run;
A) 5
B) 7
C) 12
D) 8

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page9

33) ConsidertheIFTHENstatementshownbelow.Whenthestatementisexecuted,which
expressionisevaluatedfirst?
Ifmarks>=94
And(research=Aor(project=AandPresent=A))
Thengrade=A++;
A) Marks>=94
B) Research=A
C) Project=Aandpresent=A
D) Research=Aor(project=Aandpresent=A)
34) Ifyousubmitthefollowingprogram,whichvariablesappearinthenewdataset?
Datawork.emp(drop=agehiredate);
Setbank.employee(keep=agehiredatesalary);
Ifsalary>15000andage>40;
Run;
A) None
B) Salary
C) Agesalary
D) Agehiredatesalary
35) Whichdatastepwillusetocombinework.oneandwork.twotoproducework.three?
Work.one
no
name
1
Apple
3
Orange
5
Banana
Work.two
No
2
4

Name2
Mango
Lichi

Work.three
Obs
1
2
3
4
5

No
1
3
5
2
4

Name
Apple
Orange
Banana

Name2

Mango
Lichi

A) Datawork.three;
Setonetwo;
Run;

B) Datafruit.three;
TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page10


Setonetwo;
Run;
C) Datawork.three;
Mergeonetwo;
Byname;
Run;
36) Whichfunctioncalculatestheaverageofthevariablesvar1,var2,var3,andvar4?
A) Mean(var1,var2)
B) Mean(var1var4)
C) Mean(ofvar1,var4)
D) Mean(ofvar1var4)
37) AtypicalvalueforthecharactervariableTargetis654,321.Whichstatementcorrectly
convertsthevaluesofTargettonumericvalueswhencreatingthevariableTargetNo?
A) TargetNo=input(target,comma6.);
B) TargetNo=input(target,comma7.);
C) TargetNo=put(target,comma6.);
D) TargetNo=put(target,comma7.);
38) WhichstatementisfalseregardingDOUNTILstatements?
A)Theconditionisevaluatedatthetopoftheloop,beforetheenclosedstatementsare
executed.
B)Theenclosedstatementsarealwaysexecutedatleastonce.
C)SASstatementsintheDOloopareexecuteduntilthespecifiedconditionistrue.
D)TheDOloopmusthaveaclosingENDstatement.
39)Howmanyobservationswillthedatasetwork.earningcontain?
Datawork.earning;
Value=3000;
Doyear=1to30;
Interest=value*0.70;
Value+interest;
Output;
End;
Run;
A)0
B)1
C)19
D)30

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page11

40)WhichstatementisfalseregardinganARRAYstatement?
A)Itisanexecutablestatement.
B)Itcanbeusedtocreatevariables.
C)Itmustcontaineitherallnumericorallcharacterelements.
D)Itmustbeusedtodefineanarraybeforethearraynamecanbereferenced.
41)FinishtheARRAYstatementbelowtocreatetemporaryarrayelementsthathaveinitialvalues
of9100,9300,9600,and9900.
arraygoal{4}...;
A)_temporary_(9100930096009900)
B)temporary(9100930096009900)
C)_temporary_9100930096009900
D)(temporary)9100930096009900
42)WhatbelongswithinthebracesofthisARRAYstatement?
Arraysubject{?}sub1sub3;
A)
B)
C)
D)

Subject
Subject*
3
13

43)Formattedinputcanbeusedtoread
A)standardfreeformatdata.
B)Standarddatainfixedfields
C)nonstandarddatainfixedfields.
D)bothstandardandnonstandarddatainfixedfields.
44)Aninputdatafilehasdateexpressionsintheform11232009.WhichSASinformatshouldyou
usetoreadthesedates?
A)DATE6.
B)DATE8.
C)MMDDYY6.
D)MMDDYY8.

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page12

45)Whichpointercontrolisusedtoreadrecordsnonsequentially?
A)@n
B)#n
C)+n
D)/
46)Arecordthatisbeingheldbyasingletrailingatsign(@)isautomaticallyreleasedwhen
A)Theinputpointermovespasttheendoftherecord.
B)ThenextiterationoftheDATAstepbegins.
C)Anotherinputstatementthathasasingletrailingatsign(@)executes.
D)Anothervalueisreadfromtheobservation.

47)WhatisthedefaultvalueoftheYEARCUTOFF=Systemoption?
A)1910
B)1900
C)1920
D)1930

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page13

Fillintheblanks.
1) TheSUMstatementisautomaticallysetto___________beforeSASreadsthefirst
observation.
2) InBYGroupprocessing,theFIRST.variableissetto____________whenanobservationis
thefirstinabygroup;otherwise,itequals0.
3) TheSORTprocedureproducesonlyan__________dataset,butno_______________.
4) The_________statementspecifiesthesortingvariables.
5) The___________________datasetoptionspecifiesastartingpointand_______________
Datasetoptionspecifiesanendingpointforprocessinganinputdataset.
6) SASstepsbeginwitheither____________________or__________________.
7) The________________statementisusedwhenreadingdatalocateddirectlyintheprogram.
8) The____________proceduredisplaysthedescriptorportionofaSASdataset.
9) _____________variabletypeisusedbySAStostoredatevalues?
10) SASvariablenamesmuststartwith___________or________________.
11) EverySASstatementendswitha__________________.
12) Bydefault,numericvariablesarestoredin___________________bytesofstorage.
13) Amissingnumericvaluesisdisplayedasa______________.
14) Alibrefnamemustbe___charactersorless.
15) TheSETstatementcanread____________or_______________datasets.
16) ____________input,youcanreadnonstandarddataforwhichSASrequireadditional
instructions.
17) Toreadwithlistinput,datavaluesmustbeseparatedwitha____________.
18) The____________statementcannotbeusedtoselectrecordsfromarawdatafile.
19) DuringtheprocessingofeveryDATAstep,SASautomaticallycreates__________and
_______temporaryvariables.
20) The_____________procedureaddstheobservationsfromoneSASdatasettotheendof
anotherSASdataset.
21) InPROCMEANS,usea___________statementtolimitoutputtorelevantvariables.
22) ______pointercontrolisusedtoreadmultiplerecordssequentially.
23) The_____________atsignholdsarecordacrossmultipleiterationsoftheDATAStepuntil
theendoftherecordisreduced,

TestCodeep/Base/A00211
Author:KrishnaNanavaty
VersionNo:ep/No.001/18thJan2010

Page14

You might also like