0% found this document useful (0 votes)
102 views

Base SAS Interview Questions

This document provides questions that could be asked during a Base SAS interview and answers to some of those questions. It discusses the differences between PROC MERGE and PROC SQL, PROC MEANS and PROC SUMMARY, and provides examples of using dashes, double dashes, colons, _ALL_, _CHARACTER_ and _NUMERIC_ in SAS code. It also addresses questions about system variables, automated variables, dataset variables, creating an empty dataset, reading input files, removing formats, displaying duplicate observations, the flow of the DATA step, SAS compilation vs interpretation, and validating SAS programs.

Uploaded by

Suchi Kashyap
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Base SAS Interview Questions

This document provides questions that could be asked during a Base SAS interview and answers to some of those questions. It discusses the differences between PROC MERGE and PROC SQL, PROC MEANS and PROC SUMMARY, and provides examples of using dashes, double dashes, colons, _ALL_, _CHARACTER_ and _NUMERIC_ in SAS code. It also addresses questions about system variables, automated variables, dataset variables, creating an empty dataset, reading input files, removing formats, displaying duplicate observations, the flow of the DATA step, SAS compilation vs interpretation, and validating SAS programs.

Uploaded by

Suchi Kashyap
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

12/28/2014

BaseSASInterviewQuestions
0

More NextBlog

CreateBlog SignIn

BaseSASInterview
Questions
Wednesday,February9,2011

1.WhatisthedifferencebetweenMergeandProcSQL?
Theresultantdatasetdependsontheinputdatasets.Incaseofonetooneandonetomanybothwork
similarly,i.e.theresultantdatasetissame.Butdiffersincaseofmanytomanyandnon
matchingdatasets:
manytomany:
ex:(mergeonx)(procsql)
XYXZXYZXYZ

1A1F1AF1AF
1C1R>1CR1AR
2B2G2BG1CF
1CR
2BG

NONMATCHINGDATA:
ex:(mergeonx)(procsql)
XYXZXYZXYZ

1A1F1AF1AF
2B3T>2B.3CT
3C4G3CT
4.G
2.DifferencebetweenProcMeans&ProcSummary
Ans:
a)ProcSummarydefaultstoNOPRINT
ProcMeansdefaultstoPRINT
b)IfyouomittheVARstatement,thenPROCSUMMARYproducesasimplecountofobservations,
whereasPROCMEANStriestoanalyzeallthenumericvariablesthatarenotlistedintheother
statements
c)IfyouspecifystatisticsonthePROCSUMMARYstatementandtheVARstatementisomitted,then
PROCSUMMARYstopsprocessingandanerrormessageiswrittentotheSASlog.
d)IfyouomittheVARstatement,thenPROCMEANSanalyzesallnumericvariablesthatarenotlistedin
theotherstatements.Whenallvariablesarecharactervariables,PROCMEANSproducesasimplecount
ofobservations.
3.Checkthebelowavailableoptions:
1)dash():Usingadashbetweentwovariablenameswillcreateanorderedlistof
http://basesasinterviewquestions.blogspot.in/

1/10

12/28/2014

BaseSASInterviewQuestions

variables.
SoKEEPVAR1VAR4
isequivalenttoKEEPVAR1VAR2VAR3VAR4
Note,ifoneofthevariablesexpectedintheorderedlistdoesnotexistaWARNINGwillbe
issuedtothelog.
However,ifusingthedashwhendefininganarray,themissingvariablewillbecreated.
2)doubledash():Usingadoubledashbetweentwovariablenameswillcreatealistof
variablesastheyareorderedinthedataset.
SoifIhavethefollowingvariablesinadatasetinthisorderINTN,SSN,NAME,
ADDRESS,CITY
thenKEEPINTNADDRESS
isequivalenttoKEEPINTNSSNNAMEADDRESS
3)colon(:):Usingacolonafterastringofletterswillcreatealistofallvariables
beginningwiththoseletter.
Thatisvar:willcreatealistofallvariablesinthedatasetthatbeginwiththose3letters.
IfIhaveadatasetwithvariablesnamedVARSSNVARINTNVARNAMEVARDATE,then
KEEPVAR:
isequivalenttoKEEPVARSSNVARINTNVARNAMEVARDATE
4)_ALL_:Usingthe_ALL_willcreatealistofallthevariablesinthedataset.
SoifIhaveadatasetwithvariablesVAR1VAR2VAR3andVAR4.Then
KEEP_ALL_
isequivalenttoKEEPVAR1VAR2VAR3VAR4
Thisonecanbemostusefulwithaprocsortnodupkeytoremoverecordswhichare
exactmatchsonallvariables.
PROCSORTDATA=TESTNODUPKEY
BY_ALL_
RUN
5)_CHARACTER_:Using_CHARACTER_createsalistofallthecharactervariablesinthe
dataset.
IfIhaveadatasetwithtwocharactervariablesCVAR1andCVAR2andtwonumeric
variablesNVAR3NVAR4,then
KEEP_CHARACTER_
isequivalenttoKEEPCVAR1CVAR2
6)_NUMERIC_:Using_NUMERIC_createsalistofallthenumericvariablesintheataset.
Sointhesamedatesetfrom#5,then

KEEP_NUMERIC_
isequivalenttoKEEPNVAR1NVAR2
Both_CHARACTER_and_NUMERIC_canbeusefulwhencreatingarrays,sinceallthe
variablesinthearraymustbethesametype.

4.whataresystemvariables,automatedvariablesandDatasetVariables.
5.Howwillyouwriteacodetocreateasasdatasetwithnodatainit/OrHowtovalidateadataset
withoutactualcreatingit.
Ans:
1)UseOPTIONSOBS=0
http://basesasinterviewquestions.blogspot.in/

2/10

12/28/2014

BaseSASInterviewQuestions

2)Creatingadatasetbyusingthelikeclause.
ex:procsql
createtablelatha.emplikeoracle.emp
quit
Inthisthelikeclausetriggerstheexistingtablestructuretobecopiedtothenewtable.usingthismethod
resultinthecreationofanemptytable.
3)datacheck
set_null_
run
4)datatest
delete
run
checktheaboveanswers..Ihavenotverifiedifitwillwork..

6.Thereisadateintheinfileas010149.Weneedtoreadthedateas2049insteadof1949
Ans:SetOptionsyearcuoff=2000
7.DifferencebetweenMergeandSetwithexample
8.Differenceb/wleftjoin,rightjoin,fullouterjoin
9.DoyouusePROCREPORTorPROCTABULATE?Whichdoyouprefer?Explain.
IpreferProcreportasitishiglycustomizableandflexiblewhereIcandefineeachcolumninwhatever
wayI
wanttoandevenmakeuseofSASfunctions,logicprocessing,andassignmentstatementsandcreate
new
variablesforreportmakinguseofthecomputeblockofprocreport.Ireferredprocreportbecauseitis
moreefficienttoolthantabulatebecasusewithreportwecandomeansfrequencyandtabulatealso
10.procReportandoptionsavailableinProcReport
11.ODS
12.howwillyoureadaninputfileintosas
Ans:UsethestatementsINFILEtopointtothefilereference(shouldbedefinedusingFilename)/tothe
filepath.UseINPUTstatementtoreadthedataintothesasdataset
13.Howwouldyouremoveaformatthathasbeenpermanentlyassociatedwithavariable?
Ans:wecanremovetheformatbyusingprocdatasets:
Procdatasets
modify<datasetname>
format<variablename>(whichvariableformatneedsto
modify>
run
quit
14.howtodisplayduplicatedobservationsinadatausingbasesas
Therearetwowaystodisplayduplicateobservations.
1)Indatastep,usingfirst.varandlast.var
2)Usingprocsortwithoptiondupoutoption

15.IntheflowofDATAstepprocessing,whatisthefirstactioninatypicalDATAStep?
Ans:
1)CompilationPhase:
WhenyousubmitaDATAstep,itreadstheinputstatementsitcreatesaninputbufferandbringsthe
variablesandobservations.itisalogicalmemoryareaandpdvbringstheobservationsatatimefrominput
buffer
andcheckstheerrors.PDVcontains2automaticvariables_n_&_error_,thesecheckstheerrorsin
observations.
_n_:indicatesthenoofobs.
http://basesasinterviewquestions.blogspot.in/

3/10

12/28/2014

BaseSASInterviewQuestions

_error_:1iferroroccured
0ifnoerror
Afterthatitassignsthedatavaluestoappropriatevariableandbuildsasasdataset.
2)ExecutionPhase
16.DoesSAS?Translate?(compile)ordoesit?Interpret??Explain.
AtypicalSASprogramcouldcontainDATAsteps,PROCstepsandmacros.Macrosarepreprocessed.
DATAstepsarejustintimecompiled.PROCstepsareinterpretedintheordertheyappearinprogram.So
whenwesubmitaSASprogramconsistingofallthesethreecomponents,themacroiscompiledand
executedfirst.IfaDATAstepisencountered,thenitiscompiledandexecuted.NotethattheDATAstep
willnotbeexecutedifthereisanerrorinthecompilation.IfaPROCstepisencountered,itisinterpreted
andexecutedlinebyline.HoweveriamnotcertainonthisPROCstepbehavior.

17.AtcompiletimewhenaSASdatasetisread,whatitemsarecreated?
Ans:OnlyPDVisgeneratedatcompilationtime,whereastheautomaticvariables_N_,_ERROR_are
generatedatexecutiontimeonly.
18.howdouvalidatesasprogram
Ans:Whenasascodeissubmitted,SASperformssyntacticalchecksbeforeexecutingtheprogram/
code.Inthatcase,oneofthewayscouldbe
atthebeginningofthecode,writeOPTIONSOBS=0inadditiontootheroptionsandthenRUNit.
Thiswaydatawillnotbeprocessedandthelogshowserrormessages/warnings,ifany.
IfyouareexecutingtheSAScodeonPCSAS,thehighlightedcolorsitselfshowsthesyntacticalerrors,
ifany.
19.NameanddescribethreeSASfunctionsthatyouhaveused,ifany?
1)Compresssasfunctionwhichisusedtoremovespacesinstringvalueandconcatenatetwovalues
withoutspaces.
2)Inputisanotherfunctionofsas,itisoneofconversionfunctioninsas.Itconvertsnumericintochar.
3)Putisanotherconversionfunctioninsas.Itconvertschartonumeric.
4)SASfunctionscanbeusedtoconvertdataandmanipulatecharactervariablevalues.
differenttypesoffunctions:1)TRIM
2)SUBSTR
3)ABS
4)SCAN
TRIM:Removingthetrailingblanksfromcharacterexpressions.
syntax=trim(argument)
SUBSTR:substrextractsthesubstringfromanargument
syntax=substr(argument,position<,n>)
abs:Returnstheabsoluteoftheargument
syntax=abs(argument)

Themostcommonfunctionsthatwouldbeusedare
ConversionfunctionsInput/Put/int/ceil/floor
CharacterfunctionsScan/substr/index/Left/trim/compress/cat/catx/upcase,lowcase
ArithmeticfunctionsSum/abs/
AttributeinfofunctionsAttrn/length
Datasetopen/close/exist
Directorydexist/dopen/dclose/dcreate/dinfo
Filefunctionsfexist/fopen/filename/fileref
SQLfunctionscoalesce/count/sum/mean
Datefunctionsdate/today/datdif/datepart/datetime/intck/mdy
Arrayfunctionsdim

20.Whenlookingfordatacontainedinacharacterstringof150bytes,whichfunctionisthebesttolocate
thatdata:scan,index,orindexc?
INDEX:Searchesacharacterexpressionforastringofcharacters,andreturnsthepositionofthestring's
firstcharacterforthefirstoccurrenceofthestring.
INDEX(source,excerpt)
itreturnsthepositionwherethe2ndfieldisinthesource
http://basesasinterviewquestions.blogspot.in/

4/10

12/28/2014

BaseSASInterviewQuestions

Eg:
str1='Hiiamfinehere.howareuthere?.....'
str2=index(str1,'how')>str2=20
SCANistogetasubstringuptomentionedcharacter.Scanfunctionthebestforlocatingtheparticular
wordspecifiedinaargument,scanfunctiondefaultlengthis200bytes.
datak
r='ganeshkumar'
u=scan(r,2)
procprint
run
result:kumar
INDEXCtolocateonlyformentionedoneormoresinglecharacter
INDEXC(charactervalue,'char1','char2','char3',..)
FIND:Searchesforaspecificsubstringofcharacterswithinacharacterstring
FIND(string,substring<,modifiers><,startpos>)
itreturnsthepositionthesubstringisin
FINDC:Tolocateacharacterthatappearsordoesnotappearwithinastring.usedtosearchforanyonein
alistofcharacter
values
INDEXW:Searchesforthesubstringasawordthatfollowsaspaceintheprovidedsentence
egstring1="thereisathehere"
INDEXW(STRING1,"the")

result:12(theword"the")
21.Ifyouhaveadatasetthatcontains100variables,butyouneedonlyfiveofthose,whatisthecodeto
forceSAStouseonlythosevariable?
Ans:UseKEEPoptiononadatasettoonlyselectfewvariablesfrom100variables.WecanuseKEEP
optioneitheronsetstatementordatastepstatement.IfweuseonSETstatementthenonlythe
fivevariablesarecreatedonpdvandonlythesevariablesaresenttotheoutputdataset.IfweuseKEEP
optionondatastepstatementthenallthevariablesarecopiedintopdvandafteranymaniuplationonlythe
selectedvariablesondatastepstatementareprocessedandsenttooutputdataset.
dataabc
setxyz(keep=abcdefgh)
run
dataabc(keep=abcdefghij)
setxyz
ij=ab+jk
run
22.WhatisthepurposeofthetrailingandHowwouldyouusethem?
IfthedataiscontinuoslyindatasetSASwouldreadthefirstwordsonlyfromeachlineinthe`datalines'
blockanditwillignoretherestoftheline.ifweuseTrailing@@'itwillreadcompletly.andanothertypeof
trailingisusingsingle@thisisalineholdspecifier.
Trailing@isusedtoholdtherecordininputbuffertoexecuteanotherinputstatementonthesame
datalines.
Trailing@@isusedtoholdtherecordininputbuffertoexecutesameinputstatementonsamedatalines
intileofrecord
Thetrailing@ormoretechnically,lineholdspecifiersareusedtoholdthepointerinthesamerecordfor
multipleiterations.Thetwotyoesoflineholdspecifiersaresingletrailing(@)anddoubletrailing(@@).
Thesingletrailingholdtherecorduntilitencounterseitheranotherinputstatementorendofthedatastep.
Theyareusedfortherecordssuchas
http://basesasinterviewquestions.blogspot.in/

5/10

12/28/2014

BaseSASInterviewQuestions

001F38H
002F40G
Toreadthesevaluestothedatastep
Dataexample
input@10type$@
iftype='H'then
input@1id3.@4gender$1.@5age2.
elseiftype='G'then
input@1id3.@5gender$1.@7age2.
end
cards
001F38H
002F40G

run
Thedoubletrailingholdstheuntiltheendoftherecord.
Dataexample2
inputidage@@
cards
0012300243003650043200554

run

23.WhatisthesignificanceoftheOFinX=SUM(OFa1a4,a6,a9)?
Ans:Itisusetotellsastoconsiderasetofvaluestobeprocessed.Intheaboveexample,SUM(OFa1
a4,a6,a9)resolvestoSUM(A1,A2,A3,A4,A6,A9).
Ifwedontuse'OF'thenitwouldbetreatedasaminussign..A1(Minus)A4andthatisnotwhatweare
tryingtoaccomplish.
24.HowdoyoudebugandtestyourSASprograms?
putstatementanddebugoptionisusedfordebugandtesttheprograms.
25.Howdoyoutestformissingvalues?
NMISSOPTIONisusedformissingvalues
26.Howwouldyoucreatemultipleobservationsfromasingleobservation?
linepointerisusedformultiplelinesperobservation
@@isusedformultipleobservationsperline
27.WhataresomegoodSASprogrammingpracticesforprocessingverylargedatasets?
ARRAYSISUSEDFORPROCESSINGFORLARGEDATASET
28.Brieflydescribe5waystodoa"tablelookup"inSAS.
29.WhyisSASconsideredselfdocumenting?
WHENDATASETISCREATEDSASCREATEDISCRIPTORPORTION
ANDDATAPORTION.THATMEANSSASSTORESTHEINFOMATIONLIKE
VARIABLENAME,LENGTH,TYPEetc.
30.HowdoesSAShandlemissingvaluesin:assignmentstatements,functions,amerge,anupdate,sort
order,formats,PROCs?

Whenyoucheckforordinarymissingnumericvalues,youcanusecodethatissimilartothefollowing:
ifnumvar=.thendo
Ifyourdatacontainsspecialmissingvalues,youcancheckforeitheranordinaryorspecialmissingvalue
withastatementthatissimilartothefollowing:
ifnumvar<=.zthendo
Tocheckforamissingcharactervalue,youcanuseastatementthatissimilartothefollowing:
ifcharvar=''thendo
http://basesasinterviewquestions.blogspot.in/

6/10

12/28/2014

BaseSASInterviewQuestions

TheMISSINGfunctionenablesyoutocheckforeitheracharacterornumericmissingvalue,asin:
ifmissing(var)thendo
31.Howdoyougeneraterandomsamples?ranuni
questionwillbeaskedlike:Ihaveadatasetthatcreatesavalue..Ineedsomerandomvaluestobe
generatedeachtimeiexecutethatcodeforcreatingthatdataset,howwillyougeneratetherandom
values..
UsethefunctionRANUNI
32.WhatistheProgramDataVector(PDV)?Whatareitsfunctions?
WhenSASprocessesadatastepithastwophases.Compilationphaseandexecutionphase.
Duringthecompilationphasetheinputbufferiscreatedtoholdarecordfromexternalfile.Afterinput
bufferis
createdthePDViscreated.ThePDVistheareaofmemorywheresasbuildsdataset,oneobservationat
atime.ThePDVcontainstwoautomaticvariables_N_and_ERROR_.

TotheaboveanswersIliketoaddabitofinformationthatPDVhasevenmoreautomatedvariablessuch
as
FIRST.<bygroupvariable>,LAST.<bygroupvariable>,_END_,...etc,alongwith_ERROR_and_N_
whereeachhasgotitsownsignificancetohaveacontrolovertheexecutionofaSASProgram.
Source:SASbook
ThePDVcontainsallthevariablesintheinputdataset,thevariablescreatedinDATAstepstatements,
andthetwovariables,_N_and_ERROR_,thatareautomaticallygeneratedforeveryDATAstep.The
_N_variablerepresentsthenumberoftimestheDATAstephasiterated.The_ERROR_variableactslike
abinaryswitchwhosevalueis0ifnoerrorsexistintheDATAstep,or1ifoneormoreerrorsexist
VariablesthatarecreatedbytheINPUTandtheSumstatementsaresettomissinginitially.Notethatin
thisrepresentation,numericvariablesareinitializedwithaperiodandcharactervariablesareinitialized
withblanks.Theautomaticvariable_N_issetto1theautomaticvariable_ERROR_issetto0.
ThevariableTeamNameismarkedDropinthePDVbecauseoftheDROP=datasetoptionintheDATA
statement.DroppedvariablesarenotwrittentotheSASdataset.The_N_and_ERROR_variablesare
droppedbecauseautomaticvariablescreatedbytheDATAsteparenotwrittentoaSASdataset
33.Ifreadinganexternalfiletoproduceanexternalfile,whatistheshortcuttowritethatrecordwithout
codingeverysinglevariableontherecord?
APUTStatementusingaVariable_infile_canbeusedtoachievethistask.wherewewonthaveto
mentionallthevariablenamesforoutputusingputstatement.
_all_WriteallvarpresentinDatasetincludingcomputedvariablesalso.
_input_writeonlythosevariablesreadfrominputfile
_infile_readsinallthecontentfromanexternalinputfileasasingleblock.Itcanbeusedtowriteoutif
nochangesareneeded.

34.Ifreadingavariablelengthfilewithfixedinput,howwouldyoupreventSASfromreadingthenext
recordifthelastvariabledidn?thaveavalue?
UsetheMISSOVERkeyworditforcesSAStoputeitherablankoraperiodforthemissingvariable
beforecontinuingtothenextrecord.
35.whatisthediffb/wverificationvalidationinsas
verification:
isthevalueiscorrectotnot
validation:
isthevalueisexistableornot
EX:0<=p(x)<=1
validation:valueofp(x)mustbeliesbetween0and1otherwiseit'snotvalidateresult
verification:checkagainthecalculationprocesstoobtainthevalidvalueforp(x).......
p(x)meansprobabilityofx(Success)
36.Whatistheonestatementtosetthecriteriaofdatathatcanbecodedinanystep?
OPTIONS
http://basesasinterviewquestions.blogspot.in/

7/10

12/28/2014

BaseSASInterviewQuestions

37.WhatisthepurposeofusingtheN=PSoption?
TheN=PSoptioncreatesabufferinmemorywhichislargeenoughtostorePAGESIZE(PS)linesand
enablesapagetobeformattedrandomlypriortoitbeingprinted.
38.Whichdateadvancesadate,timeordate/timevaluebyagiveninterval?
Hereisthedetailedusageofintnxfunction
date1=intnx('month','01jan95'd,5,'beginning')
putdate1/date1date7.
date2=intnx('month','01jan95'd,5,'middle')
putdate2/date2date7.
date3=intnx('month','01jan95'd,5,'end')
putdate3/date3date7.
date4=intnx('month','01jan95'd,5,'sameday')
putdate4/date4date7.
date5=intnx('month','15mar2000'd,5,'same')
putdate5/date5date9.
interval='month'
date='1sep2001'd
align='m'
date4=intnx(interval,date,2,align)
putdate4/date4date7.
39.Ifyouneedthevalueofavariableratherthanthevariableitselfwhatwouldyouusetoloadthevalue
toa
macrovariable?
Ifweneedavalueofamacrovariablethenwemustdefineitinsuchtermssothatwecancallthem
everywhereintheprogram.DefineitasGlobal.Therearedifferentwaysofassigningaglobalvariable.
Simplestmethodis%LET.
Ex:A,ismacrovariable.
Usefollowingstatementtoassignthevalueofaratherthanthevariableitself
%LetA=xyzx="&A"
Thiswillassign"xyz"tox,notthevariablexyztox.
40.Howdoireadmultiplespacesindatasets?
1)WhilereadingexternaldataifthereareanyconsecutiveblanksweuseDSD.
2)Whilereadingfreeformatextrenaldata,iftwowordshavetobereadforasingvariableweuse&.
41.
dataabc
inputswkgotam
cards
12345678
23456789

run
iwanttheoutputtobeinthesortedorder(onlyvariables).observationsshouldnotbechanged..
Useoptionsformdlim='.'
****createadummyvariablebyassigningthevaluesofany
oneofurvariable
****hereIhavetakenthevaluesofSvariableofyourABC
dataset
datasetabc
setabc
l=s
http://basesasinterviewquestions.blogspot.in/

8/10

12/28/2014

BaseSASInterviewQuestions

run
procprintrun
*transposethevariablesintoobservationsofatransposed
datasetbyusingtheIDstatement
proctransposedata=setabcout=T1_abclet
idl
run
procprintrun
**sortthetransposeddatasetbyusing_name_variable
inordertogetvaribalesinaascendingorder
procsortdata=T1_abc
by_name_
run
procprintrun
**onceagaintransposethesorteddatasetwiththe_name_
variableinIDstatement
proctransposedata=t1_abcout=t2_abc(drop=_name_)let
id_name_
run
procprintnoobs
title'sortingthevariablesinAscendingorder'
run
42WHATISDEBUGGING?HOWTOTESTTHEDEBUGGINGINSAS?
Debuggingistheprocessoftestingthelogicoftheprogram.
TodebugthesasDatastep:usetheDebugclauseafter'/'inthedatastatementandexecute.Ifneeded
setwatchpoints,andkeeponpressingenterkeywhileObservingthevaluesinthedebuggerlog
window.Finallyexitfromit.
TodebugtheMacroprograms,usethesystemoptionslikeSymbolgen,Mlogic,Mprint.
Debuggingisalsosupportedbythelogwindowbynotes,warnings,errorsandmessegesofandError
macro
variables.
43.HowtoimporttheZipfilesintoSAS?IfitispossibleinSAS?Ifitisposiblewritethecode...
PROCIMPORTOUT=WORK.ALL
DATAFILE="C:\Users\MyDocuments\xxxx\file1.zip"
DBMS=CSVREPLACE
GETNAMES=YES
DATAROW=2
RUN
44.DifferenceBetweenProcMeansandProcSummary:
procmeans:Itwillgivedescreptivestatitstics.Bydefaultitwillgiveoutputinoutputwindow.
limitedstatisticswillgiveliken,mean,median,minandmax.Ifweneedadditionalstatisticsweneedtoadd
options.
Procsummary:samethingbutitwillnotgiveoutputasdefault.weneedgiveanoptionprintthenonlyitwill
givetheoutput.

1)ProcMeansgenerateadefaultoutputbutProcSummaryrequirePrintoptiontogenerateoutputsimilar
toprocmeans.
2)TogetsimilaroutputsProcsummaryshouldcompulsoryhaveatleastonevariableinVARstatement.
Ifyouwantaprooffortheabovepleaserunthebelowcode:
procmeansdata=sasuser.admit
run
procsummarydata=sasuser.admitprint
run
Theoutputswillbedifferent.
45.SCANOVER,MISSOVER,TRUNCOVER,FLOWOVER,STOPOVER...
46.explainnwayinProcsummary
http://basesasinterviewquestions.blogspot.in/

9/10

12/28/2014

BaseSASInterviewQuestions

PostedbyAmulyaat4:42PM Nocomments:

Recommend this on Google

Home
Subscribeto:Posts(Atom)

Followers

Jointhissite
withGoogleFriendConnect

Members(3)

Alreadyamember?Signin

BlogArchive

2011(1)
February(1)
1.WhatisthedifferencebetweenMergeandProc...

AboutMe

Amulya
Viewmycompleteprofile

Simpletemplate.PoweredbyBlogger.

http://basesasinterviewquestions.blogspot.in/

10/10

You might also like