DownloadvalidSASA00-232examdumpstohelpyoupassyourexameasily
1.Whichofthefollowingisfalse?
AMacrofunctionsarealwaysprocessedduringtheexecutionoftheDATAstep
B.TocreateamacrovariablethatisbasedondatacalculatedbytheDATAstep,youusetheSYMPUTX routine
CMacrovariablereferencesinaDATAsteparealwaysresolvedbeforeDATAstepexecution DA%LETstatementcausesthemacroprocessortocreateamacrovariablebeforetheprogramis compiled
Answer:A
Explanation:
MostmacrofunctionsarehandledbythemacroprocessorbeforeanySASlanguagestatementsinthe DATAstepareexecutedForexample,the%LETstatementandanymacrovariablereferences(&macvar) arepassedtothemacroprocessorbeforetheprogramiscompiled.Inordertocreateorupdatemacro variablesduringDATAstepexecution,youusetheSYMPUTroutine

2WhichstatementisfalseregardinganARRAYstatement?
A.Itmustbeusedtodefineanarraybeforethearraynamecanbereferenced. BItcanbeusedtocreatevariables
C.Itmustcontaineitherallnumericorallcharacterelements. DItisanexecutablestatement
Answer:D
Explanation:
AnARRAYstatementisnotanexecutablestatement;itmerelydefinesanarray
3GiventhePROCSQLqueryandtablesshownbelow,whichoutputisgenerated?
A.Duetothelimitofthesystem,theanswersareprovidedabove BDuetothelimitofthesystem,theanswersareprovidedabove CDuetothelimitofthesystem,theanswersareprovidedabove DDuetothelimitofthesystem,theanswersareprovidedabove
Answer:B
Explanation:
Thecorrectanswerisb
ThisPROCSQLqueryisaninnerjoinItcombinestherowsfromthefirsttablethatmatchrowsfromthe secondtable,basedonthematchingcriteriathatarespecifiedintheWHEREclauseColumnsarenot overlaid,soallcolumnsfromthereferencedtables(includinganycolumnswithduplicatenames)are

DownloadvalidSASA00-232examdumpstohelpyoupassyourexameasily
displayed.Anyunmatchedrowsfromeithertablearenotdisplayed.
4.Whatdoesacomponentobjectconsistof?
AMethods
BBothaandb
CNoneoftheabove
DAttributes
Answer:B
Explanation:
ComponentobjectsaredataelementsthatconsistofattributesandmethodsAttributesaretheproperties thatspecifytheinformationwhilemethodsdefinetheoperationsthatanobjectcanperform
5Whichofthefollowingisfalse?
A.Onlymacrolanguagestatementsarecheckedforsyntaxerrorswhenthemacroiscompiled. BCompiledmacrosarestoredinatemporarySAScatalogbydefault
C.Amacrodefinitioncanincludemacrovariablereferences,butitcannotincludeSASlanguage statements
D.A%MACROstatementmustalwaysbepairedwitha%MENDstatement.
Answer:C
Explanation:
Amacrodefinitionmustbeginwitha%MACROstatementandmustendwitha%MENDstatementThe macrodefinitioncanincludemacrolanguagestatementsaswellasSASlanguagestatementsWhenthe macroiscompiled,macrolanguagestatementsarecheckedforsyntaxerrorsThecompiledmacrois storedinatemporarySAScatalogbydefault
6WhathappensifyoustoreamacrodefinitioninaSAScatalogSOURCEentry?
AAlloftheabove
BYoudonotneedtocompilethemacrobeforeyouinvokeitinaprogram
C.ThemacrodefinitioncanbesubmittedforcompilationbyusingtheFILENAMEand%INCLUDE statements
D.TheSOURCEentrywillbedeletedattheendofthesession.
Answer:C
Explanation:
WhenamacrodefinitionisstoredasacatalogSOURCEentry,youmustcompileitbeforeyoucancallit fromaSASprogram.YoucompileamacrothatisstoredasacatalogSOURCEentrybyusingthe CATALOGaccessmethodThiscreatesasessioncompiledmacrothatisdeletedattheendoftheSAS sessionThePROCCATALOGstatementenablesyoutoviewalistofthecontentsofaSAScatalog
7CaseStudy1:WriteyourownSAScodeinSASprogrammingenvironment
Directions
ThisscenariousestheCertadvAlldatasetWriteaSASprogramthatdoesthefollowing:
•InaPROCFCMPstep,createatemporarycustomfunctioncalledAddingwithanumericargument namedValThefunctionitselfreturnsthevalueofFinal,whichisthevalueof38addedtothevalueofVal StorethefunctionintheoutputlibraryWorkwiththetablenameofFunctionandthepackagenameof
Add.
•Inaglobalstatement,addtheappropriateoptionsothatSASknowswheretosearchforthecustom function.
•InaDATAstep,createthetemporarydatasetnamedWorkStudentCostbyreadinginthedataset CertadvAllCreateacustomfunctionfortheFeevariabletocreateavariablenamedFinalCost
•InaPROCPRINTstep,createareportbasedonWorkStudentCostwiththefollowingvariables displayed:StudentName,CourseCode,Fee,andFinalCost
TestYourCode
1WhatisthevalueofFinalCostforobservation144?
2WhatisthevalueofFinalCostforobservation282?ExamObjective
CreatecustomfunctionswiththeFCMPprocedure
A.NA
Answer:A
Explanation:
Note:Ontheliveexam,youwillbeevaluatedbothontheresultsofyourcodeandthecodeitselfYour codeshouldbesimilartothefollowingexamplecode,butdoesnotneedtomatchexactly:
1TheFCMPprocedureenablesyoutocreatecustomfunctionsusingDATAstepsyntaxTheOUTLIB= optionspecifiesWorkFunctionasthetableinwhichtheAddpackageisstoredTheAddpackageisa collectionofroutinesthathaveuniquenames.
2TheFUNCTIONstatementspecifiesthefunctionnameandthefunctionarguments,aswellaswhether thefunctionreturnsacharacterornumericvalue.TheAddingcustomfunctionhasonenumericargument namedVal,anditreturnsanumericvalueThevariableFinaliscomputedas38plusthevalueofthe function'sargument.
3TheRETURNstatementspecifiesthevalueofFinaltobereturnedfromthefunction
4.TheENDSUBstatementendsthesyntaxforthefunction.
5TheCMPLIB=optionspecifiesWorkFunctiontableforSAStosearchforapackagethatcontainsthe desiredfunction
6TheDATAstepcreatesatemporarydatasetnamedWorkStudentCostSASreadsCertadvAlldataset tocreateWorkStudentCost

7TheDATAstepcreatesanewvariablenamedFinalCostTheFinalCostencompassesthefeeforthe courseandanadditionalstudentfeeThenewvariablereferencesthecustomfunctionAddingThe functionaddsaconstantvalueof38tothevalueofFeeThefunctionreturnsthevalueofFinal,whichis thenassignedtothevalueofFinalCost
8ThePROCPRINTstepdisplaystheoutputdatawithonlythespecifiedvariables:StudentName,
DownloadvalidSASA00-232examdumpstohelpyoupassyourexameasily
1.CorrectAnswer.438
2CorrectAnswer688
8WhichofthefollowingPROCSQLstepscreatesanewtablebycopyingonlythecolumnstructure(but nottherows)ofanexistingtable?
Explanation:
TheCREATETABLEstatementthatincludesaLIKEclausecopiesthecolumnnamesandattributesfrom anexistingtableintoanewtableNorowsofdataareinserted



9Supposeyouareaskedtocreateareportofthecoursesthatareofferedinallthreeavailablelocations Thereportshouldnotcontainanyduplicateitems. Whichprogramcorrectlydisplaysthefollowingqueryresult?(pic)




Answer:C
Explanation:
YoucannotcreateamacrovariableinthesameSQLstepinwhichyouarecallingthemacrovariableTo createareportthatdoesnotcontainanyduplicateitemsincludingthevaluesinthemacrovariable,use theDISTINCTkeywordintheSELECTclause
10Howmanystatementsdoestheprogrambelowcontain?

Answer:A
Explanation:
Therearetwostatements,thePROCSQLstatementandtheSELECTstatementTheSELECT statementcontainsthreeclauses:theSELECTclause,theFROMclause,andtheORDERBYclause.

11.WhichofthefollowingcorrectlycreatesamacrovariableinaPROCSQLstep?

DownloadvalidSASA00-232examdumpstohelpyoupassyourexameasily

B.OptionB
COptionC
DOptionD
Answer:C
Explanation:
YoucanusetheINTOclausetocreateoneormoremacrovariablesintheSELECTclauseTheINTO keywordisfollowedbyacolon(:)andthenthemacrovariablename
12ThekeywordALLcannotbeusedwithwhichofthefollowingsetoperators? AUNION BEXCEPT C.OUTERUNION
DINTERSECT
Answer:C
Explanation:
Bydefault,whenprocessingasetoperationthatcontainstheEXCEPT,INTERSECT,andUNIONset operators,PROCSQLmakesanextrapassthroughthedatatoeliminateduplicaterowsThekeyword ALLisusedtosuppressthatadditionalpassthroughthetables,allowingduplicaterowstoappearinthe resultsetBecausetheOUTERUNIONsetoperatordisplaysallrows,thekeywordALLisinvalidand cannotbeusedwithOUTERUNION

