Anda di halaman 1dari 36

Thecontentsoftherawdatafile

AMOUNTarelistedbelow:
102030
$1,234
ThefollowingSASprogramis
submitted:
datatest
infile'amount'
input@1salary6.
if_error_thendescription='Problems'
elsedescription='NoProblems'
run
Whichoneofthefollowingisthevalue
oftheDESCRIPTIONvariable?
A.Problems
B.NoProblems
C.''(missingcharactervalue)
D.Thevaluecannotbedeterminedas
theprogramfailstoexecutedueto
errors.

Thecontentsoftherawdatafile
AMOUNTarelistedbelow:
102030
$1,234
ThefollowingSASprogramis
submitted:
datatest
infile'amount'
input@1salary6.
run
Whichoneofthefollowingisthevalue
oftheSALARYvariable?
A.1234
B.1,234
C.$1,234
D..(missingnumericvalue)

Thecontentsoftherawdatafile
CALENDARarelistedbelow:
102030
01012000
ThefollowingSASprogramis
submitted:
datatest
infile'calendar'
input@1datemmddyy10.
ifdate='01012000'dthenevent=
'January1st'
run
Whichoneofthefollowingisthevalue
oftheEVENTvariable?
A.01012000
B.January1st
C..(missingnumericvalue)
D.Thevaluecannotbedeterminedas
theprogramfailstoexecutedueto
errors.

Thecontentsoftherawdatafile
EMPLOYEEarelistedbelow:
102030
Ruth3911
Jose3222
Sue3033

John4044
ThefollowingSASprogramis
submitted:
datatest
infile'employee'
inputemployee_name$14
ifemployee_name='Ruth'theninput
idnum1011
elseinputage78
run
Whichoneofthefollowingvaluesdoes
thevariableIDNUMcontainwhenthe
nameoftheemployeeis"Ruth"?
A.11
B.22
C.32
D..(missingnumericvalue)
Thecontentsoftherawdatafile
EMPLOYEEarelistedbelow:
102030
Ruth3911
Jose3222
Sue3033
John4044
ThefollowingSASprogramis
submitted:
datatest
infile'employee'
inputemployee_name$14
ifemployee_name='Sue'theninput
age78
elseinputidnum1011
run
Whichoneofthefollowingvaluesdoes
thevariableAGEcontainwhenthe
nameoftheemployeeis"Sue"?
A.30
B.33
C.40
D..(missingnumericvalue)

Thecontentsoftherawdatafile
FURNITUREarelistedbelow:
102030
chair,,table
chair,couch,table

ThefollowingSASprogramis
submitted:
datastock
infile'furniture'dsd
inputitem1$item2$item3$
run
Whichoneofthefollowingisthevalue
ofthevariablenamedITEM2inthefirst
observationoftheoutputdataset?
A.table
B.,table
C..(missingnumericvalue)
D.''(missingcharactervalue)
Thecontentsoftherawdatafile
NAMENUMarelistedbelow:
102030
Joexx

ThefollowingSASprogramis
submitted:
datatest
infile'namenum'
inputname$number
run
Whichoneofthefollowingisthevalue
oftheNUMBERvariable?
A.xx
B.Joe
C..(missingnumericvalue)
D.Thevaluecannotbedeterminedas
theprogramfailstoexecutedueto
errors.
ThecontentsoftherawdatafileSIZE
arelistedbelow:
102030
7295
ThefollowingSASprogramis
submitted:
datatest
infile'size'
input@1height2.@4weight2
run
Whichoneofthefollowingisthevalue
ofthevariableWEIGHTintheoutput
dataset?
A.2
B.72
C.95
D..(missingnumericvalue)

ThecontentsoftherawdatafileTEAM
arelistedbelow:
102030
Janice10
Henri11
Michael11
Susan12
ThefollowingSASprogramis
submitted:
datagroup
infile'team'
inputname$15.age2.
file'filespecification'
putname$15.+5age2.
run
Whichoneofthefollowingdescribes
theoutputcreated?
A.arawdatafileonly
B.aSASdatasetnamedGROUPonly
C.aSASdatasetnamedGROUPanda
rawdatafile
D.Nooutputisgeneratedasthe
programfailstoexecuteduetoerrors.

Thecontentsoftherawdatafile
TYPECOLORarelistedbelow:
102030
daisyyellow
ThefollowingSASprogramis
submitted:
dataflowers
infile'typecolor'
inputtype$15+1color$

run
Whichoneofthefollowingrepresents
thevaluesofthevariablesTYPEand
COLOR?
A.typecolor
daisyyellow
B.typecolor
daisyellow
C.typecolor
daisyyellow(missingcharactervalue)
D.Novaluesarestoredastheprogram
failstoexecuteduetosyntaxerrors.
ThecontentsoftheSASdatasetnamed
PERM.STUDENTSarelistedbelow:
nameage
Alfred14
Alice13
Barbara13
Carol14
ThefollowingSASprogramissubmitted
usingthePERM.STUDENTSdataset
asinput:
libnameperm'SASdatalibrary'
datastudents
setperm.students
file'filespecification'
putname$15.@5age2.
run
Whichoneofthefollowingrepresents
thevalueswrittentotheoutputrawdata
file?
A.102030
Alfred14
Alice13
Barbara13
Carol14
B.102030
Alfr14
Alic13
Barb13a
Caro14
C.102030
Alfr14ed
Alic13e
Barb13ara
Caro14l
D.102030
Alfred14
Alice13
Barbara13
Carol14

ThecontentsoftheSASdataset
PERM.JAN_SALESarelistedbelow:
VARIABLENAMETYPE
idnumcharactervariable
sales_datenumericdatevalue
Acommadelimitedrawdatafileneeds
tobecreatedfromthe
PERM.JAN_SALESdataset.The
SALES_DATEvaluesneedtobein
aMMDDYY10form.
WhichoneofthefollowingSASDATA
stepscorrectlycreatesthisrawdata
file?

A.libnameperm'SASdatalibrary'
data_null_
setperm.jan_sales
file'filespecification'dsd=','
putidnumsales_date:mmddyy10.
run
B.libnameperm'SASdatalibrary'
data_null_
setperm.jan_sales
file'filespecification'dlm=','
putidnumsales_date:mmddyy10.
run
C.libnameperm'SASdatalibrary'
data_null_
setperm.jan_sales
file'filespecification'
putidnumsales_date:mmddyy10.dlm
=','
run
D.libnameperm'SASdatalibrary'
data_null_
setperm.jan_sales
file'filespecification'
putidnumsales_date:mmddyy10.dsd
=','
run
ThefollowingSASDATAstepexecutes
onMonday,April25,2000:
datanewstaff
setstaff
start_date=today()
run
Whichoneofthefollowingisthevalue
ofthevariableSTART_DATEinthe
outputdataset?
A.acharacterstringwiththevalue
'04/25/2000'
B.acharacterstringwiththevalue
'Monday,April25,2000'
C.thenumericvalue14725,
representingtheSASdateforApril25,
2000
D.thenumericvalue04252000,
representingtheSASdateforApril25,
2000

ThefollowingSASDATAstepis
submitted:
datasasdata.atlanta
sasdata.boston
work.portland
work.phoenix
setcompany.prdsales
ifregion='NE'thenoutputboston
ifregion='SE'thenoutputatlanta
ifregion='SW'thenoutputphoenix
ifregion='NW'thenoutputportland
run
Whichoneofthefollowingistrue
regardingtheoutputdatasets?
A.Nolibraryreferencesarerequired.
B.ThedatasetslistedonalltheIF
statementsrequirealibraryreference.
C.ThedatasetslistedinthelasttwoIF
statementsrequirealibraryreference.

D.ThedatasetslistedinthefirsttwoIF
statementsrequirealibraryreference.
ThefollowingSASDATAstepis
submitted:
datawork.accounting
setwork.department
lengthjobcode$12
run
TheWORK.DEPARTMENTSASdata
setcontainsacharactervariablenamed
JOBCODEwithalengthof5.
Whichoneofthefollowingisthelength
ofthevariableJOBCODEintheoutput
dataset?
A.5
B.8
C.12
D.Thelengthcannotbedeterminedas
theprogramfailstoexecutedueto
errors.

ThefollowingSASDATAstepis
submitted:
libnametemp'SASdatalibrary'
datatemp.report
setsasuser.houses
newvar=price*1.04
run
Whichoneofthefollowingstatementsis
trueregardingtheprogramabove?
A.Theprogramisreadingfroma
temporarydatasetandwritingtoa
temporarydataset.
B.Theprogramisreadingfroma
temporarydatasetandwritingtoa
permanentdataset.
C.Theprogramisreadingfroma
permanentdatasetandwritingtoa
temporarydataset.
D.Theprogramisreadingfroma
permanentdatasetandwritingtoa
permanentdataset.

ThefollowingSASprogramissubmitted
andreads100recordsfromarawdata
file:
datawork.total
infile'filespecification'end=eof
inputname$salary
totsal+salary

run
WhichoneofthefollowingIF
statementswritesthelastobservationto
theoutputdataset?
A.ifend=0
B.ifeof=0
C.ifend=1
D.ifeof=1
ThefollowingSASprogramis
submitted:
dataallobs
setsasdata.origin(firstobs=75obs=
499)
run

TheSASdatasetSASDATA.ORIGIN
contains1000observations.
Howmanyobservationsdoesthe
ALLOBSdatasetcontain?
A.424
B.425
C.499
D.1000
ThefollowingSASprogramis
submitted:
data_null_
setold(keep=prodsales1sales2)
file'filespecification'
putsales1sales2
run
Whichoneofthefollowingdefault
delimitersseparatesthefieldsinthe
rawdatafilecreated?
A.:(colon)
B.(space)
C.,(comma)
D.(semicolon)

ThefollowingSASprogramis
submitted:
data_null_
setold
putsales1sales2
run
Whereistheoutputwritten?
A.theSASlog
B.therawdatafilethatwasopenedlast
C.theSASoutputwindoworanoutput
file
D.thedatasetmentionedintheDATA
statement

ThefollowingSASprogramis
submitted:
datanumrecords
infile'filespecification'
input@1patient$15.
relative$1626@
ifrelative='children'then
input@54diagnosis$15.@
elseifrelative='parents'then
input@28doctor$15.
clinic$4453
@54diagnosis$15.@
inputage
run
Howmanyrawdatarecordsareread
duringeachiterationoftheDATAstep
duringexecution?
A.1
B.2
C.3
D.4

ThefollowingSASprogramis
submitted:
datarevenue
setyear_1
var1=mdy(1,15,1960)
run
Whichoneofthefollowingvaluesdoes

thevariablenamedVAR1contain?
A.14
B.15
C.1151960
D.'1/15/1960'
ThefollowingSASprogramis
submitted:
datastats
setrevenue
arrayweekly{5}montuewedthufri

total=weekly{i}*.25
output
end
run
WhichoneofthefollowingDO
statementscompletestheprogramand
processestheelementsoftheWEEKLY
array?
A.doi=1to5
B.doweekly{i}=1to5
C.doi=montuewedthufri
D.ADOloopcannotbeusedbecause
thevariablesreferenceddonotendina
digit.
ThefollowingSASprogramis
submitted:
datatest
setsasuser.employees
if2leyears_servicele10then
amount=1000
elseifyears_servicegt10then
amount=2000
else
amount=0
amount_per_year=years_service/
amount
run
Whichoneofthefollowingvaluesdoes
thevariableAMOUNT_PER_YEAR
containifanemployeehasbeenwith
thecompanyfor
oneyear?
A.0
B.1000
C.2000
D..(missingnumericvalue)

ThefollowingSASprogramis
submitted:
datawork.accounting
setwork.dept1work.dept2
run
AcharactervariablenamedJOBCODE
iscontainedinboththeWORK.DEPT1
andWORK.DEPT2SASdatasets.The
variable
JOBCODEhasalengthof5inthe
WORK.DEPT1datasetandalengthof
7intheWORK.DEPT2dataset.
Whichoneofthefollowingisthelength
ofthevariableJOBCODEintheoutput
dataset?
A.5

B.7
C.8
D.12
ThefollowingSASprogramis
submitted:
datawork.clients
calls=6
dowhile(callsle6)
calls+1
end
run
Whichoneofthefollowingisthevalue
ofthevariableCALLSintheoutputdata
set?
A.4
B.5
C.6
D.7

ThefollowingSASprogramis
submitted:
datawork.company
setwork.dept1(keep=jobcode)
work.dept2(rename=(jcode=
jobcode))
run
Whichoneofthefollowingistheresult?
A.ThevariableJCODEiswrittentothe
outputdataset.
B.ThevariableJOBCODEiswrittento
theoutputdataset.
C.NeithervariableJCODEnor
JOBCODEiswrittentotheoutputdata
set.
D.Theprogramfailstoexecutedueto
errors.

ThefollowingSASprogramis
submitted:
datawork.empsalary
setwork.people(in=inemp)
work.money(in=insal)
ifinsalandinemp
run
TheSASdatasetWORK.PEOPLEhas
5observations,andthedataset
WORK.MONEYhas7observations.
Howmanyobservationswillthedata
setWORK.EMPSALARYcontain?
A.0
B.5
C.7
D.12

ThefollowingSASprogramis
submitted:
datawork.flights
destination='cph'
select(destination)
when('LHR')city='London'
when('CPH')city='Copenhagen'
otherwisecity='Other'
end
run
Whichoneofthefollowingisthevalue
oftheCITYvariable?

A.Other
B.Copenh
C.Copenhagen
D.''(missingcharactervalue)
ThefollowingSASprogramis
submitted:
datawork.flights
destination='CPH'
select(destination)
when('LHR')city='London'
when('CPH')city='Copenhagen'
otherwise
end
run
Whichoneofthefollowingisthevalue
oftheCITYvariable?
A.London
B.Copenh
C.Copenhagen
D.''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
datawork.january
setwork.allmonths(keep=product
monthnum_soldcost)
ifmonth='Jan'thenoutput
work.january
sales=cost*num_sold
keep=productsales
run
Whichvariablesdoesthe
WORK.JANUARYdatasetcontain?
A.PRODUCTandSALESonly
B.PRODUCT,MONTH,NUM_SOLD
andCOSTonly
C.PRODUCT,SALES,MONTH,
NUM_SOLDandCOSTonly
D.Anincompleteoutputdatasetis
createdduetosyntaxerrors.

ThefollowingSASprogramis
submitted:
datawork.month
date=input('13mar2000',date9.)
run
Whichoneofthefollowingrepresents
thetypeandlengthofthevariable
DATEintheoutputdataset?
A.numeric,8bytes
B.numeric,9bytes
C.character,8bytes
D.character,9bytes

ThefollowingSASprogramis
submitted:
datawork.month
date=put('13mar2000'd,ddmmyy10.)
run
Whichoneofthefollowingrepresents
thetypeandlengthofthevariable
DATEintheoutputdataset?
A.numeric,8bytes
B.numeric,10bytes
C.character,8bytes
D.character,10bytes

ThefollowingSASprogramis
submitted:
datawork.new
lengthword$7
amount=4
ifamount=4thenword='FOUR'
elseifamount=7thenword='SEVEN'
elseword='NONE!!!'
amount=7
run
Whichoneofthefollowingrepresents
thevaluesoftheAMOUNTandWORD
variables?
A.amountword
7FOUR
B.amountword
7SEVEN
C.amountword
4FOUR
D.amountword
4''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
datawork.new
lengthword$7
amount=7
ifamount=5thenword='CAT'
elseifamount=7thenword='DOG'
elseword='NONE!!!'
amount=5
run
Whichoneofthefollowingrepresents
thevaluesoftheAMOUNTandWORD
variables?
A.amountword
5DOG
B.amountword
5CAT
C.amountword
7DOG
D.amountword
7''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
datawork.new
mon=3
day=23
year=2000
date=mdy(mon,day,year)
run
Whichoneofthefollowingisthevalue
oftheDATEvariable?
A.acharacterstringwiththevalue
'23mar2000'
B.acharacterstringwiththevalue
'03/23/2000'
C.anumericvalueof14692,which
representstheSASdatevaluefor
March23,2000
D.anumericvalueof3232000,which
representstheSASdatevaluefor
March23,2000

ThefollowingSASprogramis
submitted:
datawork.one
x=3
y=2
z=x**y
run
Whichoneofthefollowingisthevalue
ofthevariableZintheoutputdataset?
A.6
B.9
C..(missingnumericvalue)
D.Theprogramfailstoexecutedueto
errors.

ThefollowingSASprogramis
submitted:datawork.passengers
datawork.passengers
ifOrigPassengers=.then
OrigPassengers=100
TransPassengers=100
OrigPassengers=.
NonPaying=10
TotalPassengers=OrigPassengers+
TransPassengers
run
Whichoneofthefollowingisthevalue
oftheTOTALPASSENGERSvariablein
theoutputdataset?
A.100
B.110
C.200
D..(missingnumericvalue)

ThefollowingSASprogramis
submitted:
datawork.passengers
ifOrigPassengers=.then
OrigPassengers=100
TransPassengers=100
OrigPassengers=.
NonPaying=10
TotalPassengers=sum
(OrigPassengers,TransPassengers)
run
Whichoneofthefollowingisthevalue
oftheTOTALPASSENGERSvariablein
theoutputdataset?
A.100
B.110
C.200
D..(missingnumericvalue)

ThefollowingSASprogramis
submitted:
datawork.pieces
dowhile(nlt6)
n+1
end
run
Whichoneofthefollowingisthevalue
ofthevariableNintheoutputdataset?
A.4
B.5
C.6
D.7

ThefollowingSASprogramis
submitted:
datawork.products
Product_Number=5461
Item='1001'
Item_Reference=
Item'/'Product_Number
run
Whichoneofthefollowingisthevalue
ofthevariableITEM_REFERENCEin
theoutputdataset?
A.1001/5461
B.1001/5461
C..(missingnumericvalue)
D.Thevaluecannotbedeterminedas
theprogramfailstoexecutedueto
errors.

ThefollowingSASprogramis
submitted:
datawork.report
setwork.sales_info
ifqtr(sales_date)ge3
run
TheSASdatasetWORK.SALES_INFO
hasoneobservationforeachmonthin
theyear2000andthevariable
SALES_DATEwhich
containsaSASdatevalueforeachof
thetwelvemonths.
Howmanyoftheoriginaltwelve
observationsinWORK.SALES_INFO
arewrittentotheWORK.REPORTdata
set?
A.2
B.3
C.6
D.9

ThefollowingSASprogramis
submitted:
datawork.retail
cost='20000'
total=.10*cost
run
Whichoneofthefollowingisthevalue
ofthevariableTOTALintheoutputdata
set?
A.2000
B.'2000'
C..(missingnumericvalue)
D.''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
datawork.sales
doyear=1to5
domonth=1to12
x+1
end
end
run
Whichoneofthefollowingrepresents
howmanyobservationsarewrittento
theWORK.SALESdataset?
A.0

B.1
C.5
D.60
ThefollowingSASprogramis
submitted:
datawork.sets
dountil(prodgt6)
prod+1
end
run
Whichoneofthefollowingisthevalue
ofthevariablePRODintheoutputdata
set?
A.5
B.6
C.7
D.8

ThefollowingSASprogramis
submitted:
datawork.staff
JobCategory='FA'
JobLevel='1'
JobCategory=JobCategory||
JobLevel
run
Whichoneofthefollowingisthevalue
ofthevariableJOBCATEGORYinthe
outputdataset?
A.FA
B.FA1
C.FA1
D.''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
datawork.test
arrayagents{4}$12sales1sales4
run
Whichoneofthefollowingrepresents
thevariablesthatarecontainedinthe
outputdataset?
A.SALES1,SALES2,SALES3,SALES4
B.AGENTS1,AGENTS2,AGENTS3,
AGENTS4
C.None,theDATAstepfailsbecause
theARRAYstatementcanreference
onlynumericdata.
D.None,theDATAstepfailsbecause
theARRAYstatementcanreference
onlypreexistingvariables.

ThefollowingSASprogramis
submitted:
datawork.test
Author='AgathaChristie'
First=substr(scan(author,1,','),1,1)
run
Whichoneofthefollowingisthelength
ofthevariableFIRSTintheoutputdata
set?
A.1
B.6
C.15
D.200

ThefollowingSASprogramis
submitted:
datawork.test
Author='Christie,Agatha'
First=substr(scan(author,2,','),1,1)
run
Whichoneofthefollowingisthevalue
ofthevariableFIRSTintheoutputdata
set?
A.A
B.C
C.Agatha
D.''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
datawork.test
First='Ipswich,England'
City=substr(First,1,7)
City_Country=City!!','!!'England'
run
Whichoneofthefollowingisthevalue
ofthevariableCITY_COUNTRYinthe
outputdataset?
A.Ipswich!!
B.Ipswich,England
C.Ipswich,'England'
D.Ipswich,England

ThefollowingSASprogramis
submitted:
datawork.test
First='Ipswich,England'
City_Country=substr(First,1,7)!!',
'!!'England'
run
Whichoneofthefollowingisthelength
ofthevariableCITY_COUNTRYinthe
outputdataset?
A.6
B.7
C.17
D.25

ThefollowingSASprogramis
submitted:
datawork.test
setwork.staff(keep=jansalesfebsales
marsales)
arraydiff_sales{3}difsales1difsales3
arraymonthly{3}jansalesfebsales
marsales
run
Whichoneofthefollowingrepresents
thenewvariablesthatarecreated?
A.JANSALES,FEBSALESand
MARSALES
B.MONTHLY1,MONTHLY2and
MONTHLY3
C.DIFSALES1,DIFSALES2and
DIFSALES3
D.DIFF_SALES1,DIFF_SALES2and
DIFF_SALES3

ThefollowingSASprogramis
submitted:
datawork.test

Title='ATaleofTwoCities,CharlesJ.
Dickens'
Word=scan(title,3,',')
run
Whichoneofthefollowingisthevalue
ofthevariableWORDintheoutputdata
set?
A.T
B.of
C.Dickens
D.''(missingcharactervalue)
ThefollowingSASprogramis
submitted:
datawork.totalsales(keep=
monthsales{12})
setwork.monthlysales(keep=year
productsales)
arraymonthsales{12}
doi=1to12
monthsales{i}=sales
end
run
Thedatasetnamed
WORK.MONTHLYSALEShasone
observationpermonthforeachoffive
yearsforatotalof60observations.
Whichoneofthefollowingistheresult
oftheaboveprogram?
A.Theprogramfailsexecutiondueto
dataerrors.
B.Theprogramfailsexecutiondueto
syntaxerrors.
C.Theprogramexecuteswithwarnings
andcreatestheWORK.TOTALSALES
dataset.
D.Theprogramexecuteswithouterrors
orwarningsandcreatesthe
WORK.TOTALSALESdataset.

ThefollowingSASprogramis
submitted:
datawork.totalsales
setwork.monthlysales(keep=year
productsales)
retainmonthsales{12}
arraymonthsales{12}
doi=1to12
monthsales{i}=sales
end
cnt+1
monthsales{cnt}=sales
run
Thedatasetnamed
WORK.MONTHLYSALEShasone
observationpermonthforeachoffive
yearsforatotalof60observations.
Whichoneofthefollowingistheresult
oftheaboveprogram?
A.Theprogramfailsexecutiondueto
dataerrors.
B.Theprogramfailsexecutiondueto
syntaxerrors.
C.Theprogramrunswithwarningsand
createstheWORK.TOTALSALESdata
setwith60observations.

D.Theprogramrunswithouterrorsor
warningsandcreatesthe
WORK.TOTALSALESdatasetwith60
observations.
ThefollowingSASprogramis
submitted:
datawork.total
setwork.salary(keep=department
wagerate)
bydepartment
iffirst.departmentthenpayroll=0
payroll+wagerate
iflast.department
run
TheSASdatasetnamed
WORK.SALARYcontains10
observationsforeachdepartment,
currentlyorderedbyDEPARTMENT.
Whichoneofthefollowingistrue
regardingtheprogramabove?
A.TheBYstatementintheDATAstep
causesasyntaxerror.
B.FIRST.DEPARTMENTand
LAST.DEPARTMENTarevariablesin
theWORK.TOTALdataset.
C.ThevaluesofthevariablePAYROLL
representthetotalforeachdepartment
intheWORK.SALARYdataset.
D.ThevaluesofthevariablePAYROLL
representatotalforallvaluesof
WAGERATEintheWORK.SALARYdata
set.

ThefollowingSASprogramis
submitted:
datawork.total
setwork.salary(keep=department
wagerate)
bydepartment
iffirst.departmentthenpayroll=0
payroll+wagerate
iflast.department
run
TheSASdatasetWORK.SALARY,
currentlyorderedbyDEPARTMENT,
contains100observationsforeachof5
departments.
Whichoneofthefollowingrepresents
howmanyobservationsthe
WORK.TOTALdatasetcontains?
A.5
B.20
C.100
D.500

ThefollowingSASprogramis
submitted:
footnote1'SalesReportforLastMonth'
footnote2'SelectedProductsOnly'
footnote3'AllRegions'
footnote4'AllFiguresinThousandsof
Dollars'
procprintdata=sasuser.shoes
footnote2'AllProducts'
run

Whichoneofthefollowingcontainsthe
footnotetextthatisdisplayedinthe
report?
A.AllProducts
B.SalesReportforLastMonth
AllProducts
C.AllProducts
AllRegions
AllFiguresinThousandsofDollars
D.SalesReportforLastMonth
AllProducts
AllRegions
AllFiguresinThousandsofDollars
ThefollowingSASprogramis
submitted:
libnamecompany'SASdatalibrary'
procsortdata=company.payroll
byEmployeeIDNumber
run
Writeaccesshasbeengrantedtothe
COMPANYlibrary.
Whichoneofthefollowingrepresents
howtheobservationsaresorted?
A.COMPANY.PAYROLLisrecreatedin
sortedorderbyEmployeeIDNumber.
B.COMPANY.PAYROLLisstoredin
originalorder,andanewdataset
PAYROLLiscreatedinsortedorderby
EmployeeIDNumber.
C.COMPANY.PAYROLLisstoredin
originalorder,andanewdataset
COMPANY.PAYROLLSORTEDis
createdinsortedorder
byEmployeeIDNumber.
D.COMPANY.PAYROLLisrecreatedin
sortedorderbyEmployeeIDNumber,
andanewdatasetPAYROLLiscreated
insorted
orderbyEmployeeIDNumber.

ThefollowingSASprogramis
submitted:
libnamerawdata1'locationofSASdata
library'
filenamerawdata2'locationofrawdata
file'
datawork.testdata
infile
inputsales1sales2
run
Whichoneofthefollowingisneededto
completetheprogramcorrectly?
A.rawdata1
B.rawdata2
C.'rawdata1'
D.'rawdata2'

ThefollowingSASprogramis
submitted:
libnamesasdata'SASdatalibrary'
datatest
setsasdata.chemists
ifjobcode='Chem2'
thendescription='SeniorChemist'
elsedescription='Unknown'

run
AvalueforthevariableJOBCODEis
listedbelow:
JOBCODE
chem2
Whichoneofthefollowingvaluesdoes
thevariableDESCRIPTIONcontain?
A.Chem2
B.Unknown
C.SeniorChemist
D.''(missingcharactervalue)
ThefollowingSASprogramis
submitted:
libnamesasdata'SASdatalibrary'
datatest
setsasdata.chemists
ifjobcode='chem3'
thendescription='SeniorChemist'
elsedescription='Unknown'
run
AvalueforthevariableJOBCODEis
listedbelow:
JOBCODE
CHEM3
Whichoneofthefollowingvaluesdoes
thevariableDESCRIPTIONcontain?
A.chem3
B.Unknown
C.SeniorChemist
D.''(missingcharactervalue)

ThefollowingSASprogramis
submitted:
libnamesasdata'SASdatalibrary'
datatest
setsasdata.chemists(keep=
job_code)
ifjob_code='chem3'
thendescription='SeniorChemist'
run
ThevariableJOB_CODEisacharacter
variablewithalengthof6bytes.
Whichoneofthefollowingisthelength
ofthevariableDESCRIPTIONinthe
outputdataset?
A.6bytes
B.8bytes
C.14bytes
D.200bytes

ThefollowingSASprogramis
submitted:
libnametemp'SASdatalibrary'
datawork.new
settemp.jobs
formatnewdatemmddyy10.
qdate=qtr(newdate)
ddate=weekday(newdate)
run
procprintdata=work.new
run
ThevariableNEWDATEcontainsthe
SASdatevalueforApril15,2000.
WhatoutputisproducedifApril15,
2000fallsonaSaturday?

A.Obsnewdateqdateddate
1APR15200026
B.Obsnewdateqdateddate
104/15/200026
C.Obsnewdateqdateddate
1APR15200027
D.Obsnewdateqdateddate
104/15/200027
ThefollowingSASprogramis
submitted:
optionspageno=1
procprintdata=sasuser.houses
run
procmeansdata=sasuser.shoes
run
ThereportcreatedbythePRINT
procedurestepgenerates5pagesof
output.
Whatisthepagenumberonthefirst
pageofthereportgeneratedbythe
MEANSprocedurestep?
A.1
B.2
C.5
D.6

ThefollowingSASprogramis
submitted:
proccontentsdata=sasuser.airplanes
run
Whichoneofthefollowingisproduced
asoutput?
A.thedataportionofeverydatasetin
theSASUSERlibrary
B.thedataportionofthedataset
SASUSER.AIRPLANESonly
C.thedescriptorportionofeverydata
setintheSASUSERlibrary
D.thedescriptorportionofthedataset
SASUSER.AIRPLANESonly

ThefollowingSASprogramis
submitted:
procdatasetslib=sasuser
contentsdata=classvarnum
quit
Whichoneofthefollowingisthe
purposeoftheVARNUMoption?
A.toprintalistofvariablenames
B.toprintthetotalnumberofvariables
C.toprintalistofthevariablesin
alphabeticorder
D.toprintalistofthevariablesinthe
ordertheywerecreated

ThefollowingSASprogramis
submitted:
procformat
valuescore150='Fail'
51100='Pass'
run
procreportdata=work.coursesnowd
columnexam
defineexam/displayformat=score.
run
ThevariableEXAMhasavalueof50.5.

HowwilltheEXAMvariablevaluebe
displayedintheREPORTprocedure
output?
A.Fail
B.Pass
C.50.5
D..(missingnumericvalue)
ThefollowingSASprogramis
submitted:
procmeansdata=sasuser.housesstd
meanmax
varsqfeet
run
Whichoneofthefollowingisneededto
displaythestandarddeviationwithonly
twodecimalplaces?
A.AddtheoptionMAXDEC=2tothe
MEANSprocedurestatement.
B.AddthestatementMAXDEC=7.2in
theMEANSprocedurestep.
C.AddthestatementFORMATSTD7.2
intheMEANSprocedurestep.
D.AddtheoptionFORMAT=7.2option
totheMEANSprocedurestatement.

ThefollowingSASprogramis
submitted:

procmeansdata=sasuser.shoes
whereproductin('Sandal','Slipper',
'Boot')
run
WhichoneofthefollowingODS
statementscompletestheprogramand
sendsthereporttoanHTMLfile?
A.odshtml='sales.html'
B.odsfile='sales.html'
C.odsfilehtml='sales.html'
D.odshtmlfile='sales.html'
ThefollowingSASprogramis
submitted:
procprintdata=sasuser.houses
run

procmeansdata=sasuser.shoes
run
WhichoneofthefollowingOPTIONS
statementsresetsthepagenumberto1
forthesecondreport?
A.optionspageno=1
B.optionspagenum=1
C.optionsresetpageno=1
D.optionsresetpagenum=1
ThefollowingSASprogramis
submitted:
procsortdata=sasuser.housesout=
houses
bystyle
run
procprintdata=houses
run
ClickontheExhibitbuttontoviewthe
reportproduced.

stylebedroomsbathsprice
CONDO21.580050
32.579350
42.5127150
22.0110700
RANCH21.064000
33.086650
31.089100
11.034550
SPLIT11.065850
43.094450
31.573650
TWOSTORY43.0107250
21.055850
21.069250
42.5102950
WhichofthefollowingSASstatement(s)
create(s)thereport?
A.idstyle
B.idstyle
varstylebedroomsbathsprice
C.idstyle
bystyle
varbedroomsbathsprice
D.idstyle
bystyle
varstylebedroomsbathsprice
ThefollowingSASprogramis
submitted:
procsortdata=work.employee
bydescendingfname
procsortdata=work.salary
bydescendingfname
datawork.empdata
mergework.employee
work.salary
byfname
run
Whichoneofthefollowingstatements
explainswhytheprogramfailed
execution?
A.TheSORTprocedurescontain
invalidsyntax.
B.Themergeddatasetsarenot
permanentSASdatasets.
C.Thedatasetswerenotmergedinthe
orderbywhichtheyweresorted.
D.TheRUNstatementswereomitted
aftereachoftheSORTprocedures.

ThefollowingSASSORTprocedure
stepgeneratesanoutputdataset:
procsortdata=sasuser.housesout=
report
bystyle
run
Inwhichlibraryistheoutputdataset
stored?
A.WORK
B.REPORT.
C.HOUSES
D.SASUSER

InthefollowingSASprogram,theinput
datafilesaresortedbytheNAMES

variable:
libnametemp'SASdatalibrary'
datatemp.sales
mergetemp.sales
work.receipt
bynames
run
Whichoneofthefollowingresults
occurswhenthisprogramissubmitted?
A.Theprogramexecutessuccessfully
andatemporarySASdatasetis
created.
B.Theprogramexecutessuccessfully
andapermanentSASdatasetis
created.
C.Theprogramfailsexecutionbecause
thesameSASdatasetisreferencedfor
bothreadandwriteoperations.
D.Theprogramfailsexecutionbecause
theSASdatasetsontheMERGE
statementareintwodifferentlibraries.
TheobservationsintheSASdataset
WORK.TESTareorderedbythevalues
ofthevariableSALARY.
ThefollowingSASprogramis
submitted:
procsortdata=work.testout=
work.testsorted
byname
run
Whichoneofthefollowingistheresult
oftheSASprogram?
A.ThedatasetWORK.TESTisstoredin
ascendingorderbyvaluesoftheNAME
variable.
B.ThedatasetWORK.TESTisstoredin
descendingorderbyvaluesofthe
NAMEvariable.
C.ThedatasetWORK.TESTSORTEDis
storedinascendingorderbyvaluesof
theNAMEvariable.
D.ThedatasetWORK.TESTSORTEDis
storedindescendingorderbyvaluesof
theNAMEvariable.

Onwhichportion(s)ofaSASdataset
doesthePRINTprocedurereport?
A.thedataportiononly
B.thedescriptorportiononly
C.thedescriptorportionandthedata
portion
D.neitherthedataportionnorthe
descriptorportion

Questionhasbeenchangedaftersome
complainsaboutitnotbeingcorrect.
Underscorerepresentblankspace,I
hadtoaddthembecausebloggereditor
usetoremovetwoormorespacesto
one(Hint:missinginformatforprice).

Thecontentsoftherawdatafile
PRODUCTarelistedbelow:
102030
24613____$25.31

ThefollowingSASprogramis
submitted:
datainventory
infile'product'
inputidnum5.@10price
run
Whichoneofthefollowingisthevalue
ofthePRICEvariable?
A.25.31
B.$25.31
C..(missingnumericvalue)
D.Novalueisstoredastheprogram
failstoexecuteduetoerrors.
Arawdatafileislistedbelow:
102030
19012
19051
19106
1925.
19411
ThefollowingSASprogramissubmitted
andreferencestherawdatafileabove:
datacoins
infile'filespecification'
inputyearquantity

run
Whichoneofthefollowingcompletes
theprogramandproducesanon
missingvalueforthevariable
TOTQUANTITYinthelast
observationoftheoutputdataset?
A.totquantity+quantity
B.totquantity=sum(totquantity+
quantity)
C.totquantity0
sumtotquantity
D.retaintotquantity0
totquantity=totquantity+quantity
Arawdatafileislistedbelow:
102030
JohnMcCloskey3571
JuneRosesette1043
TinekeJones937
ThefollowingSASprogramissubmitted
usingtherawdatafileasinput:
datawork.homework
infile'filespecification'
inputname$ageheight
ifageLE10
run
Howmanyobservationswillthe
WORK.HOMEWORKdatasetcontain?
A.0
B.2
C.3
D.Nodatasetiscreatedasthe
programfailstoexecuteduetoerrors.

Arawdatafileislistedbelow:
102030
squash1.10
apples2.25
juice1.69

ThefollowingSASprogramissubmitted
usingtherawdatafileabove:
datagroceries
infile'filespecification'
inputitem$cost
run
Whichoneofthefollowingcompletes
theprogramandproducesagrandtotal
forallCOSTvalues?
A.grandtot=sumcost
B.grandtot=sum(grandtot,cost)
C.retaingrandtot0
grandtot=sum(grandtot,cost)
D.grandtot=sum(grandtot,cost)
outputgrandtot
Arawdatafileislistedbelow:
RANCH,1250,2,1,Sheppard
Avenue,"$64,000"
SPLIT,1190,1,1,RandStreet,"$65,850"
CONDO,1400,2,1.5,Market
Street,"80,050"
TWOSTORY,1810,4,3,Garris
Street,"$107,250"
RANCH,1500,3,3,Kemble
Avenue,"$86,650"
SPLIT,1615,4,3,WestDrive,"94,450"
SPLIT,1305,3,1.5,Graham
Avenue,"$73,650"
ThefollowingSASprogramissubmitted
usingtherawdatafileasinput:
datawork.condo_ranch
infile'filespecification'dsd
inputstyle$@
ifstyle='CONDO'orstyle='RANCH'
inputsqfeetbedroomsbathsstreet$
price:dollar10.
run
Howmanyobservationswilltheoutput
datasetcontain?
A.0
B.3
C.5
D.7

Arawdatafileislistedbelow:
RANCH,1250,2,1,Sheppard
Avenue,"$64,000"
SPLIT,1190,1,1,RandStreet,"$65,850"
CONDO,1400,2,1.5,Market
Street,"80,050"
TWOSTORY,1810,4,3,Garris
Street,"$107,250"
RANCH,1500,3,3,Kemble
Avenue,"$86,650"
SPLIT,1615,4,3,WestDrive,"94,450"
SPLIT,1305,3,1.5,Graham
Avenue,"$73,650"
ThefollowingSASprogramissubmitted
usingtherawdatafileasinput:
datawork.condo_ranch
infile'filespecification'dsd
inputstyle$@
ifstyle='CONDO'orstyle='RANCH'
then

inputsqfeetbedroomsbathsstreet$
price:dollar10.
run
Howmanyobservationsdoesthe
WORK.CONDO_RANCHdataset
contain?
A.0
B.3
C.5
D.7
Arawdatarecordislistedbelow:
102030
1999/10/25
ThefollowingSASprogramis
submitted:
dataprojectduration
infile'filespecification'
inputdate$110

run
Whichoneofthefollowingstatements
completestheprogramaboveand
computesthedurationoftheprojectin
daysasoftoday's
date?
A.duration=today()
put(date,ddmmyy10.)
B.duration=today()
put(date,yymmdd10.)
C.duration=today()
input(date,ddmmyy10.)
D.duration=today()
input(date,yymmdd10.)
Arawdatarecordislistedbelow:
102030
son,Travis,
Thefollowingoutputisdesired:
relationfirstname
sonTravis
WhichoneofthefollowingSAS
programsreadsthedatacorrectly?
A.datafamily/dlm=','
infile'filespecification'
inputrelation$firstname$
run
B.optionsdlm=','
datafamily
infile'filespecification'
inputrelation$firstname$
run
C.datafamily
infile'filespecification'dlm=','
inputrelation$firstname$
run
D.datafamily
infile'filespecification'
inputrelation$firstname$/dlm=','
run

Arawdatarecordislistedbelow:
(Questionupdated:underscoresmeans
blankspaces)
102030
Printing___750

ThefollowingSASprogramis
submitted:
databonus
infile'filespecification'
inputdept$111number1315
run
WhichoneofthefollowingSAS
statementscompletestheprogramand
resultsinavalueof'Printing750'forthe
DEPARTMENT
variable?
A.department=trim(dept)number
B.department=deptinput(number,3.)
C.department=trim(dept)||
put(number,3.)
D.department=input(dept,11.)||
input(number,3.)
Arawdatarecordisshownbelow:
07Jan2002
Whichoneofthefollowinginformats
wouldreadthisvalueandstoreitasa
SASdatevalue?
A.date9.
B.ddmonyy9.
C.ddMMMyy9.
D.ddmmmyyyy9.

Arealtorhastwocustomers.One
customerwantstoviewalistofhomes
sellingforlessthan$60,000.Theother
customerwants
toviewalistofhomessellingforgreater
than$100,000.
AssumingthePRICEvariableis
numeric,whichoneofthefollowing
PRINTprocedurestepswillselectall
desiredobservations?
A.procprintdata=sasuser.houses
wherepricelt60000
wherepricegt100000
run
B.procprintdata=sasuser.houses
wherepricelt60000orpricegt100000
run
C.procprintdata=sasuser.houses
wherepricelt60000andpricegt
100000
run
D.procprintdata=sasuser.houses
wherepricelt60000orwherepricegt
100000
run

TheSASDATA.BANKSdatasethasfive
observationswhenthefollowingSAS
programissubmitted:
libnamesasdata'SASdatalibrary'
dataallobs
setsasdata.banks
capital=0
doyear=2000to2020by5
capital+((capital+2000)*rate)
output
end

run
Howmanyobservationswillthe
ALLOBSdatasetcontain?
A.5
B.15
C.20
D.25
TheSASdatasetBANKSislisted
below:
BANKS
namerate
FirstCapital0.0718
DirectBank0.0721
VirtualDirect0.0728
ThefollowingSASprogramis
submitted:
datanewbank
doyear=1to3
setbanks
capital+5000
end
run
Whichoneofthefollowingrepresents
howmanyobservationsandvariables
willexistintheSASdataset
NEWBANK?
A.0observationsand0variables
B.1observationsand4variables
C.3observationsand3variables
D.9observationsand2variables

TheSASdatasetEMPLOYEE_INFOis
listedbelow:
IDNumberExpenses
2542100.00
3612133.15
2198234.34
2198111.12
ThefollowingSASprogramis
submitted:
procsortdata=employee_info

run
WhichoneofthefollowingBY
statementscompletestheprogramand
sortsthedatasequentiallyby
ascendingexpensevalueswithin
eachascendingIDNUMBERvalue?
A.byExpensesIDNumber
B.byIDNumberExpenses
C.byascending(IDNumberExpenses)
D.byascendingIDNumberascending
Expenses
TheSASdatasetEMPLOYEE_INFOis
listedbelow:
IDNumberExpenses
2542100.00
3612133.15
2198234.34
2198111.12
ThefollowingSASprogramis
submitted:
procsortdata=employee_info

run
WhichoneofthefollowingBY
statementscompletestheprogramand
sortsthedatasequentiallyby
descendingexpensevalueswithin
eachdescendingIDNUMBERvalue?
A.bydescendingIDNumberExpenses
B.by(IDNumberExpenses)
descending
C.byIDNumberdescendingExpenses
descending
D.bydescendingIDNumber
descendingExpenses
TheSASdatasetnamed
COMPANY.PRICESislistedbelow:
COMPANY.PRICES
prodidpriceproducttypesalesreturns
K12S5.10NETWORK152
B132S2.34HARDWARE30010
R18KY21.29SOFTWARE255
3KL8BY6.37HARDWARE12515
DY65DW5.60HARDWARE455
DGTY234.55HARDWARE672
ThefollowingSASprogramis
submitted:
libnamecompany'SASdatalibrary'
datahwareintersoft
setcompany.prices(keep=producttype
price)
ifpricele5.00
ifproducttype='HARDWARE'then
outputHWARE
elseifproducttype='NETWORK'then
outputINTER
elseifproducttype='SOFTWARE'then
outputSOFT
run
Howmanyobservationsdoesthe
HWAREdatasetcontain?
A.0
B.2
C.4
D.6

TheSASdatasetnamedWORK.TEST
islistedbelow:
capacityairplanetypestaff
150Large10
WhichoneofthefollowingSAS
programscreatedthisdataset?
A.datawork.test
capacity=150
if100lecapacityle200then
airplanetype='Large'andstaff=10
elseairplanetype='Small'andstaff=5
run
B.datawork.test
capacity=150
if100lecapacityle200then
do
airplanetype='Large'
staff=10
end
else
do

airplanetype='Small'
staff=5
end
run
C.datawork.test
capacity=150
if100lecapacityle200then
do
airplanetype='Large'
staff=10
else
do
airplanetype='Small'
staff=5
end
run
D.datawork.test
capacity=150
if100lecapacityle200then
airplanetype='Small'
staff=5
else
airplanetype='Large'
staff=10
run
TheSASdatasetQTR1_REVENUEis
listedbelow:
destinationrevenue
YYZ53634
FRA62129
FRA75962
RDU76254
YYZ82174
ThefollowingSASprogramis
submitted:
procsortdata=qtr1_revenue
bydestinationdescendingrevenue
run
Whichoneofthefollowingrepresents
thefirstobservationintheoutputdata
set?
A.destinationrevenue
YYZ82174
B.destinationrevenue
YYZ53634
C.destinationrevenue
FRA62129
D.destinationrevenue
FRA75962

TheSASdatasetSASUSER.HOUSES
containsavariablePRICEwhichhas
beenassignedapermanentlabelof
"AskingPrice".
WhichoneofthefollowingSAS
programstemporarilyreplacesthelabel
"AskingPrice"withthelabel"Sale
Price"intheoutput?
A.procprintdata=sasuser.houses
labelprice="SalePrice"
run
B.procprintdata=sasuser.houses
label
labelprice"SalePrice"
run

C.procprintdata=sasuser.houses
label
labelprice="SalePrice"
run
D.procprintdata=sasuser.houses
label="SalePrice"
run
TheSASdatasetsWORK.EMPLOYEE
andWORK.SALARYarelistedbelow:
WORK.EMPLOYEEWORK.SALARY
fnameagefnamesalary
Bruce30Bruce25000
Dan40Bruce35000
Dan25000
ThefollowingSASprogramis
submitted:
datawork.empdata
mergework.employee
work.salary
byfname
totsal+salary
run
Howmanyvariablesareoutputtothe
WORK.EMPDATAdataset?
A.3
B.4
C.5
D.Novariablesareoutputtothedata
setastheprogramfailstoexecutedue
toerrors.

TheSASdatasetsWORK.EMPLOYEE
andWORK.SALARYareshownbelow:
WORK.EMPLOYEEWORK.SALARY
fnameagenamesalary
Bruce30Bruce25000
Dan40Bruce35000
Dan25000
ThefollowingSASprogramis
submitted:
datawork.empdata

byfname
totsal+salary
run
Whichoneofthefollowingstatements
completesthemergeofthetwodata
setsbytheFNAMEvariable?
A.mergework.employee
work.salary(fname=name)
B.mergework.employee
work.salary(name=fname)
C.mergework.employee
work.salary(rename=(fname=name))
D.mergework.employee
work.salary(rename=(name=fname))
ClickCommentlinktogetanswer
TheSASdatasetWORK.AWARDSis
listedbelow:
fnamepoints
Amy2
Amy1
Gerard3
Wang3

Wang1
Wang2
ThefollowingSASprogramis
submitted:
procsortdata=work.awards
bydescendingfnamepoints
run
Whichoneofthefollowingrepresents
howtheobservationsaresorted?
A.Wang3
Gerard3
Wang2
Amy2
Wang1
Amy1
B.Wang3
Wang2
Wang1
Gerard3
Amy2
Amy1
C.Wang3
Wang1
Wang2
Gerard3
Amy2
Amy1
D.Wang1
Wang2
Wang3
Gerard3
Amy1
Amy2
ASASPRINTprocedureoutputofthe
WORK.LEVELSdatasetislistedbelow:
Obsnamelevel
1Frank1
2Joan2
3Sui2
4Jose3
5Burt4
6Kelly.
7Juan1
ThefollowingSASprogramis
submitted:
datawork.expertise
setwork.levels
iflevel=.then
expertise='Unknown'
elseiflevel=1then
expertise='Low'
elseiflevel=2or3then
expertise='Medium'
else
expertise='High'
run
Whichofthefollowingvaluesdoesthe
variableEXPERTISEcontain?
A.Low,Medium,andHighonly
B.Low,Medium,andUnknownonly
C.Low,Medium,High,andUnknown
only
D.Low,Medium,High,Unknown,and''
(missingcharactervalue)

ASASprogramissubmittedandthe
followingSASlogisproduced:
2datagt100
3setia.airplanes
4ifmpggt100thenoutput
22202
ERROR:FileWORK.IF.DATAdoesnot
exist.
ERROR:FileWORK.MPG.DATAdoes
notexist.
ERROR:FileWORK.GT.DATAdoesnot
exist.
ERROR:FileWORK.THEN.DATAdoes
notexist.
ERROR:FileWORK.OUTPUT.DATA
doesnotexist.
ERROR22322:Syntaxerror,expecting
oneofthefollowing:aname,
aquotedstring,(,,END,KEY,KEYS,
NOBS,OPEN,POINT,_DATA_,
_LAST_,_NULL_.
ERROR202322:Theoptionor
parameterisnotrecognizedandwillbe
ignored.
5run
TheIAlibrefwaspreviouslyassignedin
thisSASsession.
Whichoneofthefollowingcorrectsthe
errorsintheLOG?
A.DeletethewordTHENontheIF
statement.
B.Addasemicolonattheendofthe
SETstatement.
C.Placequotesaroundthevalueon
theIFstatement.
D.AddanENDstatementtoconclude
theIFstatement.

Unlessspecified,whichvariablesand
datavaluesareusedtocalculate
statisticsintheMEANSprocedure?
A.nonmissingnumericvariablevalues
only
B.missingnumericvariablevaluesand
nonmissingnumericvariablevalues
only
C.nonmissingcharactervariablesand
nonmissingnumericvariablevalues
only
D.missingcharactervariables,non
missingcharactervariables,missing
numericvariablevalues,andnon
missingnumericvariable
values

Thevalue110700isstoredinanumeric
variable.
WhichoneofthefollowingSASformats
isusedtodisplaythevalueas
$110,700.00inareport?
A.comma8.2
B.comma11.2
C.dollar8.2
D.dollar11.2

WhenthefollowingSASprogramis
submitted,thedataset
SASDATA.PRDSALEScontains5000
observations:
libnamesasdata'SASdatalibrary'
optionsobs=500
procprintdata=sasdata.prdsales
(firstobs=100)
run
optionsobs=max
procmeansdata=sasdata.prdsales
(firstobs=500)
run
Howmanyobservationsareprocessed
byeachprocedure?
A.400forPROCPRINT
4500forPROCMEANS
B.401forPROCPRINT
4501forPROCMEANS
C.401forPROCPRINT
4500forPROCMEANS
D.500forPROCPRINT
5000forPROCMEANS

Whichoneofthefollowingistrueofthe
RETAINstatementinaSASDATAstep
program?
A.Itcanbeusedtoassignaninitial
valueto_N_.
B.Itisonlyvalidinconjunctionwitha
SUMfunction.
C.Ithasnoeffectonvariablesreadwith
theSET,MERGEandUPDATE
statements.
D.Itaddsthevalueofanexpressionto
anaccumulatorvariableandignores
missingvalues.

Whichoneofthefollowingistrueofthe
SUMstatementinaSASDATAstep
program?
A.Itisonlyvalidinconjunctionwitha
SUMfunction.
B.ItisnotvalidwiththeSET,MERGE
andUPDATEstatements.
C.Itaddsthevalueofanexpressionto
anaccumulatorvariableandignores
missingvalues.
D.Itdoesnotretaintheaccumulator
variablevaluefromoneiterationofthe
SASDATAsteptothenext.

Whichoneofthefollowingistruewhen
SASencountersadataerrorinaDATA
step?
A.TheDATAstepstopsexecutingatthe
pointoftheerror,andnoSASdatasetis
created.
B.AnoteiswrittentotheSASlog
explainingtheerror,andtheDATAstep
continuestoexecute.
C.AnoteappearsintheSASlogthat
theincorrectdatarecordwassavedtoa
separateSASfileforfurther
examination.
D.TheDATAstepstopsexecutingatthe

pointoftheerror,andtheresulting
DATAsetcontainsobservationsupto
thatpoint.
WhichoneofthefollowingODS
statementoptionsterminatesoutput
beingwrittentoanHTMLfile?
A.END
B.QUIT
C.STOP
D.CLOSE

WhichoneofthefollowingSASDATA
stepssavesthetemporarydataset
namedMYDATAasapermanentdata
set?
A.libnamesasdata'SASdatalibrary'
datasasdata.mydata
copymydata
run
B.libnamesasdata'SASdatalibrary'
datasasdata.mydata
keepmydata
run
C.libnamesasdata'SASdatalibrary'
datasasdata.mydata
savemydata
run
D.libnamesasdata'SASdatalibrary'
datasasdata.mydata
setmydata
run

WhichoneofthefollowingSAS
proceduresdisplaysthedataportionof
aSASdataset?
A.PRINT
B.FSLIST
C.CONTENTS
D.DATASETS

WhichoneofthefollowingSAS
statementscorrectlycomputesthe
averageoffournumericalvalues?
A.average=mean(num1num4)
B.average=mean(ofnum1num4)
C.average=mean(ofnum1tonum4)
D.average=mean(num1num2num3
num4)

WhichoneofthefollowingSAS
statementsrenamestwovariables?
A.setwork.dept1
work.dept2(rename=(jcode=jobcode)
(sal=salary))
B.setwork.dept1
work.dept2(rename=(jcode=jobcode
sal=salary))
C.setwork.dept1
work.dept2(rename=jcode=jobcode
sal=salary)
D.setwork.dept1
work.dept2(rename=(jcodejobcode)
(salsalary))

WhichoneofthefollowingSASsystem
optionsdisplaysthetimeonareport?

A.TIME
B.DATE
C.TODAY
D.DATETIME
WhichoneofthefollowingSASsystem
optionspreventsthepagenumberfrom
appearingonareport?
A.NONUM
B.NOPAGE
C.NONUMBER
D.NOPAGENUM

Whichoneofthefollowingstatementsis
trueregardingthenameofaSAS
array?
A.Itissavedwiththedataset.
B.Itcanbeusedinprocedures.
C.Itexistsonlyforthedurationofthe
DATAstep.
D.Itcanbethesameasthenameofa
variableinthedataset.

Whichoneofthefollowingstatementsis
trueregardingtheSASautomatic
_ERROR_variable?
A.The_ERROR_variablecontainsthe
values'ON'or'OFF'.
B.The_ERROR_variablecontainsthe
values'TRUE'or'FALSE'.
C.The_ERROR_variableis
automaticallystoredintheresulting
SASdataset.
D.The_ERROR_variablecanbeused
inexpressionsorcalculationsinthe
DATAstep.

Anda mungkin juga menyukai