资源描述:
《01-getting-started-using-sas-software》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、The Little SAS Book: A Primer, Fifth EditionChapter1:GettingStartedUsingSASSoftware"Anhonesttalespeedsbestbeingplainlytold".WilliamShakespeare,KingRichardIIIFromKingRichardIIIbyWilliamShakespeare.Publicdomain.1.1TheSASLanguageManysoftwareapplicationsareeithermenudriven,orcommanddriven(en
2、teracommand—seetheresult).SASisneither.WithSAS,youusestatementstowriteaseriesofinstructionscalledaSASprogram.TheprogramcommunicateswhatyouwanttodoandiswrittenusingtheSASlanguage.Therearesomemenu-drivenfrontendstoSAS,forexampleSASEnterpriseGuide,whichmakeSASappearlikeapoint-and-clickprogr
3、am.However,thesefrontendsstillusetheSASlanguagetowriteprogramsforyou.YouwillhavemuchmoreflexibilityusingSASifyoulearntowriteyourownprogramsusingtheSASlanguage.Maybelearninganewlanguageisthelastthingyouwanttodo,butbeassuredthatalthoughthereareparallelsbetweenSASandlanguagesyouknow(betheyE
4、nglishorJAVA),SASismucheasiertolearn.SASProgramsASASprogramisasequenceofstatementsexecutedinorder.AstatementgivesinformationorinstructionstoSASandmustbeappropriatelyplacedintheprogram.AneverydayanalogytoaSASprogramisatriptothebank.Youenteryourbank,standinline,andwhenyoufinallyreachthetel
5、ler'swindow,yousaywhatyouwanttodo.Thestatementsyougivecanbewrittendownintheformofaprogram:Iwouldliketomakeawithdrawal.Myaccountnumberis0937.Iwouldlike$200.Givemefive20sandtwo50s.Notethatyoufirstsaywhatyouwanttodo,thengivealltheinformationthetellerneedstocarryoutyourrequest.Theorderofthes
6、ubsequentstatementsmaynotbeimportant,butyoumuststartwiththegeneralstatementofwhatyouwanttodo.Youwouldnot,forexample,gouptoabanktellerandsay,"Givemefive20sandtwo50s."Thisisnotonlybadform,butwouldprobablymaketheteller'sheartskipabeatortwo.Youmustalsomakesurethatallthesubsequentstatementsbe
7、longwiththefirst.Youwouldnotsay,"Iwantthelargestboxyouhave"whenmakingawithdrawalfromyourcheckingaccount.Thatstatementbelongswith"Iwouldliketoopenasafedepositbox."ASASprogramisanorderedsetofSASstatementsliketheorderedsetofinstructionsyouusewhenyougotothebank.SASStatementsA