资源描述:
《Enhance Your Programming with SAS® DATA Step Views》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、®EnhanceYourProgrammingwithSASDATAStepViewsThomasE.Billings,KaiserPermanente,Oakland,CaliforniaAbstractSASDATAstepviewsprovidevirtualdatasetswithintheSASsystem,and,usedproperly,canenhanceorincreasethepowerofyourprogramming.Herewereview2examplesofDATAstepviewusage:1.Usingviews,onecanprocessextr
2、emelylargesequentialdatasets(flatfilesand/orSASnativefiles)thatotherwisewouldrequiretoomuchdiskspacetoprocess.2.Viewsaresuperbtoolstointegratedissimilardatasets.Theyallowyoutocombinelegacyandnewsystemsinreportingandotherapplications,andpromotewell-designed,modularsoftwarecode.Viewscanalso,inre
3、levantcontexts,hidecomplexityandsimplifyaccess.Introduction:whatareDATAstepviews?SASDATAstepviewscanbedescribedinanumberofways:•VirtualversionsofSASdatasets,wherethephysicaldataarederivedaftertheviewisinvoked,byprocessingapre-compiledDATAstep.•AspecialtypeofstoredcompiledSASDATAstepthatcreates
4、andprovidesphysicaldataintheformofaSASdatasetorsegmentsthereof.Dependingontheusageandcontextinwhichitisinvoked,theDATAstepviewmightproduceacompletetemporarydatafileorthedatamaybesuppliedintheformofadatastream:segmentsofa(sequential)SASdatafile,constructedon-the-fly.SASDATAstepviewsarecreatedus
5、ingtheVIEW=optionontheDATAstepcommand.SASDATAstepviewsareinvoked(executed)whentheyareusedinaDATAstep,PROC,orin(another)invokedview.ThetemporaryfileproducedbyaDATAstepviewisreferredtoasthespillfile;notethatspillfilesare“nevercreatedforsequentialprocessing”ofDATAstepviews(SAS9.1.3LanguageReferen
6、ce:Dictionary,pg.52).TheSPILL=optioncanbeusedonPROCandDATAstepstocontrolspillfilegeneration,whenaccessisnon-sequential.DATAstepviewsalsoprovideanotherlogicalprocessinglayerwithintheSASsystem,specificallytheDATAstepprocessingdonetocreatethedata.AlthoughthecontextandapplicationofDATAstepviewsimp
7、lycertainconstraints,theprocessingperformedintheviewcanbeanyprocessingsupportedbytheDATAstep.ThinkofthepoweroftheDATAstep,insertedintoaPROC(fordatatransformation)oranotherDATAstep.TheofficialSASdocumentation(SAS9.1.3LanguageReference:Co