Fundamentals of Programming in SAS A Case Studies Approach James Blum
Visit to download the full and correct content document: https://textbookfull.com/product/fundamentals-of-programming-in-sas-a-case-studiesapproach-james-blum/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

SAS certification prep guide base programming for SAS 9 Fifth Edition. Edition Sas Sas Sas
https://textbookfull.com/product/sas-certification-prep-guidebase-programming-for-sas-9-fifth-edition-edition-sas-sas-sas/

SAS Certified Specialist Prep Guide Base Programming Using SAS 9 4 Sas
https://textbookfull.com/product/sas-certified-specialist-prepguide-base-programming-using-sas-9-4-sas/

SAS Certification Prep Guide Base Programming for SAS 9 4th Edition Sas Institute
https://textbookfull.com/product/sas-certification-prep-guidebase-programming-for-sas-9-4th-edition-sas-institute/

Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies Moritz Lenz
https://textbookfull.com/product/perl-6-fundamentals-a-primerwith-examples-projects-and-case-studies-moritz-lenz/

EMG Lesion Localization and Characterization A Case Studies Approach 1st Edition Mark A. Ferrante
https://textbookfull.com/product/emg-lesion-localization-andcharacterization-a-case-studies-approach-1st-edition-mark-aferrante/

Lessons in Corporate Finance A Case Studies Approach to Financial Tools Financial Policies and Valuation Paul Asquith
https://textbookfull.com/product/lessons-in-corporate-finance-acase-studies-approach-to-financial-tools-financial-policies-andvaluation-paul-asquith/

Step by Step Programming with Base SAS 9 4 Second Edition Sas Institute
https://textbookfull.com/product/step-by-step-programming-withbase-sas-9-4-second-edition-sas-institute/

Understanding Religious Violence: Radicalism and Terrorism in Religion Explored via Six Case Studies
James Dingley
https://textbookfull.com/product/understanding-religiousviolence-radicalism-and-terrorism-in-religion-explored-via-sixcase-studies-james-dingley/

Case Studies in Immunology A Clinical Companion Raif Geha
https://textbookfull.com/product/case-studies-in-immunology-aclinical-companion-raif-geha/
Foreword
ToReaders
ThisbookisdesignedtohelpyoudevelopanunderstandingoftheSASprogramming languageandtohelpyoudevelopgoodprogrammingpractices.Itisintendedasa learningguideandaskillbuilder,notasareferencebook.Tothatend,itintroducessets oftopicswithineachchapterthatareconnectedthroughasinglecasestudy.Concepts areintroducedonanas-neededbasistocompleterequiredtasks,soyouareimmediately exposedtowritingcompleteprograms.Asfurtherconceptsareintroducedtheymightbe newtopics,ortheymightrevisitpreviouslyintroducedtopicsatamorecomplexlevel. ThisreflectshowmanyofthebestSASprogrammershavebuilttheirtalents by continuallyaddinglayersofknowledgeontoabasesetofskills.Thebookmimicsthis typeofexperiencebyincreasingthecomplexityofthecasestudy,requiringtheaddition ofnewerskills,ormorecomplexversionsofearlierskills,astheyareneeded.
Becauseofthiscirclingbacktocontentfrompreviouschapters,apedagogicalconcept knownasaspiralcurriculum,youwillnotlearneverythingthisbookcoversonatopicin anysinglechapter.Ofcourse,noonebookcouldservethepurposeofgivingacomplete treatmentofallconceptsincluded;therefore,youwilloftenbereferredtooutside resources,suchasSASDocumentation,forafulldescriptionofsyntaxorformore detailedcommentary.SASDocumentationisthestandardizednameusedinthistextfor thecollectionofhelpfilesandexamplesprovidedbySASThisdocumentationis availableviatheHelpmenuinSASoronline.Readingsuchreferencesisastrategy commonlyusedbythebestSASprogrammerstorefinetheirabilitiesandisanimportant habitforyoutodeveloptobuildyourskillsasaSASprogrammerandtoexpandonthose skillsinthefuture.
Duetotheintroductionofconceptsinspiralfashion,itisimportanttobeginwiththe setupmaterialinChapter1andthentoproceedthroughthebooksequentially.Foreasy reference,thenumberingonalloutputinChapters1through7directlycorrespondsto thenumberoftheprogramthatgeneratesit.However,notallprogramsgenerateoutput. Inallchapters,theprograms,output,tables,andfiguresarenumberedsequentiallywithin eachsection.Thesamecasestudyisusedtoprovidecontinuitythroughthenarrative whenbuildingonearlierconcepts.Othercasestudiesarealsoavailableforusetobuild continuityforadditionalprogrammingactivitiesandexercises.Thisincludesacasestudy locatedinChapter8forwhichthesectionsarealignedwiththelearningobjectivesof eachchapter.Additionalcasestudiesareavailableonlinebyvisitingtheauthorpagefor eitherauthor.
ToClassroomInstructors
Asstatedintheprevioussection,thisbookisdesignedtotapintosomeofthebest practicesineducationaltheoryasitspiralsbackontotopicsthroughoutyourcourse.Itis designedbyinstructorswithover25yearsofcombinedexperienceinteachingSASeither intheclassroomorinindustry.Themoretechnicaldetailsareisolatedintheirown sectionssothatyoucaneasilyincludeorexcludethemtofittheneedsofyourcourse. Multiplecasestudiesarealsoprovidedsothatthecasestudyassignmentscanbe customizedforyourstudents’interestsandtothecontentpresentedinyourcourse.The casestudyprovidedinChapter8ensuresstudentshaveimmediateaccesstoacasestudy forreferencewhilereadingthetext.Additionalcasestudiesaremadeavailablethrough theauthorpagesforeitherauthortoensureyougetthebenefitofupdatedmaterialsona regularbasis.Anyinstructionalmaterialswillalsobeavailableeitherviatheauthorpages (forpublicresources)orbycontactingSAStoverifyyourstatusasaninstructor(for instructor-onlymaterials).Theseresourceswillberegularlyupdated.
AbouttheIPUMSCPSData
TheIPUMSCPSdataincludestheIntegratedPublicUseMicrodataSeries(IPUMS)and CurrentPopulationSurvey(CPS)beginningin1962.Thesedatasetsprovideperson-and household-levelinformationaboutavarietyofdemographicvariables.Across-sectionof recentdata(2001,2005,2010,and2015)wasreleasedforthispublicationandis includedhereasthemaincasestudyinthenarrative Visithttps://cpsipumsorgtolearn moreabouttheIPUMSCPSortoextractnewerdatatocontinuehoningyourSAS programmingskills.
AboutThisBook
WhatDoesThisBookCover?
ThistextcoversawidesetoftopicsavailableintheBaseSASsoftwareincluding:
DATAstepprogrammingincluding:
Readingdatasetsfromnon-SASsources
CombiningandrestructuringSASdatasets
Functionsandconditionallogic
DOloopsandarrays
Basicanalysisprocedures:MEANS,FREQ,CORR,andUNIVARIATE
Reportingprocedures:CONTENTS,PRINT,andREPORT
RestructuringdatawithPROCTRANSPOSE
VisualizationwiththeSGPLOTandSGPANELprocedures
SASformatsandtheFORMATprocedure
OutputDeliverySystem
Whilethisbookcoversthefoundationsofthetopicslistedabove,additionaldetailsare oftenbeyondthescopeofthistext.Referencesareprovidedforthoseinterestedin furtherstudy.
IsThisBookforYou?
AreyoutryingtolearnSASforthefirsttime?Areyouhopingtoeventuallyearnyour BaseSAScertificationandbecomeaSASCertifiedProfessional?Areyoualready comfortablewithsomeSASprogrammingbutarelookingtohoneyourskills?Ifthe answertoanyofthosequestionsis“yes,”thenthisisthebookforyou!Thisbooktakesa novelapproachtolearningSASprogrammingbyhelpingyoudevelopanunderstanding ofthelanguageandestablishgoodprogrammingpractices.Byfollowingasinglecase studythroughoutthetextandcirclingbacktopreviousconcepts,thisbookaidsinthe learningofnewtopicsthroughexplicitconnectionstopreviousmaterial.Justasthebest SASprogrammersexpandtheircapabilitiesbycontinuallyaddingtotheiralready impressiveskillsets,asyoureadthistextyouwillgaintheskillsandconfidencetotake onlargerchallengeswiththepowerofSAS.
ThisbookdoesnotassumeanypriorknowledgeoftheSASprogramminglanguage. However,anunderstandingofhowfilepathsfunctioninyouroperatingsystemis necessarytofacilitatethestorageandretrievalofdatasets,rawdatafiles,andotherfiles suchasdocumentsandgraphics
WhatShouldYouKnowAbouttheExamples?
Thisbookincludestutorialsforyoutofollowtogainhands-onexperiencewithSAS.The majorityoftheexamplesarebasedonacasestudyusingrealdata.Someexamplesuse subsetsofthecasestudydataorintroducesmallerdatasetstohelpillustrateatopic. Chapters2through7containawrap-upactivitythatusesthecasestudytotietogether conceptsfromthecurrentchapter,andeverychapterreferencesanothercasestudy containedinChapter8forfurtherpractice.Youneedaccesstothesoftwarelistedinthe nextsectiontocompletetheexercises.
Foreasyreference,thenumberingonalloutputinChapters1through7directly correspondstothenumberoftheprogramthatgeneratedit.However,notallprograms generateoutput.Inallchapters,theprograms,output,tables,andfiguresarenumbered sequentiallywithineachsection.
SoftwareUsedtoDeveloptheBook’sContent
SAS9.4TS1M3andhigherwereusedtodeveloptheexamplesandexercises.Tofollow alongwiththeexamplessimultaneouslyortocompletetheexercises,youonlyneedthe BaseSASsoftwareexceptfortheportionsofChapters7and8thatuseSAS/ACCESSto connecttoMicrosoftExcelworkbooksandMicrosoftAccessdatabases.
ExampleCodeandData
Youcanaccesstheexamplecodeanddataforthisbookbylinkingtoitsauthorpageat https://support.sas.com/authors.
SASUniversityEdition

ThisbookiscompatiblewithSASUniversityEdition.IfyouareusingSAS UniversityEdition,thenbeginhere:https://support.sas.com/ue-data.
WhereAretheExerciseSolutions?
Readers:Exercisesolutionstoselectedexercisesarepostedontheauthorpageat https://support.sas.com/authors.
ClassroomInstructors:Toobtainthefullsolutions,contactsaspress@sascom
WeWanttoHearfromYou
DoyouhavequestionsaboutaSASPressbookthatyouarereading?Contactusat saspress@sas.com.
SASPressbooksarewrittenbySASUsersforSASUsers.Pleasevisitsas.com/booksto signuptorequestinformationonhowtobecomeaSASPressauthor.
Wewelcomeyourparticipationinthedevelopmentofnewbooksandyourfeedbackon SASPressbooksthatyouareusing.Pleasevisitsas.com/bookstosignuptoreviewa book
Learnaboutnewbooksandexclusivediscounts.Signupforournewbooksmailinglist todayathttps://support.sas.com/en/books/subscribe-books.html.
Learnmoreabouttheseauthorsbyvisitingtheirauthorpages,whereyoucandownload freebookexcerpts,accessexamplecodeanddata,readthelatestreviews,getupdates, andmore:
http://support.sas.com/blum http://support.sas.com/duggins
AboutTheseAuthors

JamesBlumisaProfessorofStatisticsattheUniversityofNorthCarolinaWilmington wherehehasdevelopedandtaughtoriginalcoursesinSASprogrammingforthe universityfornearly20years.ThesecoursescovertopicsinBaseSAS,SAS/SQL, SAS/STAT,andSASmacros.Healsoregularlyteachescoursesinregression, experimentaldesign,categoricaldataanalysis,andmathematicalstatistics;andheisa primaryinstructorintheMasterofDataScienceprogramatUNCWilmington,which debutedinthefallof2017.Hehasexperienceasaconsultantondataanalysisprojectsin clinicaltrials,finance,publicpolicyandgovernment,andmarinescienceandecology.He earnedhisMSinAppliedMathematicsandPhDinStatisticsfromOklahomaState University.

JonathanDugginsisanaward-winningTeachingProfessoratNorthCarolinaState University,wherehisteachingincludesmultipleundergraduateandgraduate programmingcourses.Hisexperienceasapracticingbiostatisticianinfluenceshis classroominstruction,whereheincorporatescasestudies,utilizeslargedatasets,and holdsstudentsaccountableforthebestpracticesusedinindustry.Jonathanisamember oftheAmericanStatisticalAssociationandisactivewiththeNorthCarolinachapter.He hasbeenaSASusersince1999andhaspresentedatbothregionalandnationalstatistical andSASusergroupconferences.JonathanholdsaBSandMSinmathematicsfromthe UniversityofNorthCarolinaWilmingtonandanMSandPhDinstatisticsfromVirginia
Learnmoreabouttheseauthorsbyvisitingtheirauthorpages,whereyoucandownload freebookexcerpts,accessexamplecodeanddata,readthelatestreviews,getupdates, andmore:
https://support.sas.com/blum http://support.sas.com/duggins
Acknowledgments
Iwouldliketothankmyfamily mymotherJoAnn,myfatherRobert,andmysister Amy fortheirunwaveringsupportinallofmyacademicendeavorsovertheyears.A bigthankyoutoallofthestudentsandcolleaguesIhaveinteractedwithwho,through theirdesiretolearnmore,alsopushedmetolearnmoreandbringmoreideasbackinto theclassroom.ThankstoallofthepeopleatSASwhohelpedmakethisbookareality, particularlythoseinSASpublishing,andtoalloftheinstructorsIhadforSASTraining whohelpedmetransitionfromamediocreSASusertoanactualSASprogrammer.Anda veryspecialthankyoutomylove,Lilit,whosepatienceandencouragementgavemethe extrastrengthtofinishthisproject.
–Jim
IwanttothankthehardworkingstaffatSASwhohelpedmakethisbookareality ithas beenalearningexperienceandIamalreadylookingforwardtoworkingwithyouonthe nextproject!Whilemanyfriendsandcolleaguessupportedmeduringthisprocess,I especiallywanttothankDr.EllenBreazelforprovidinginvaluablefeedbackfromthe perspectiveofafellowSASinstructorandtoJordanLewisforhelpingensuretheneeds ofthenoviceSASuserremainedaprimaryconcernduringmywritingprocess.Thank youtomywonderfulandsupportivewife,Katherine,forkeepingmefromgettingtoo engrossedinwritingthisbook.(Alsoforhelpingmewritethisacknowledgment!)Finally, Iameternallygratefulformyparents,BillandTeresa,whohaveprovidedenthusiastic encouragementduringthisproject,justliketheyhavedoneforallofmyendeavorsfor longerthanIcanremember.Thisbookwouldnothavebeenpossiblewithoutallofyou.
–Jonathan
Chapter1:IntroductiontoSAS
1.1Introduction
12LearningObjectives
1.3SASEnvironments
1.3.1TheSASWindowingEnvironment
1.3.2SASStudioandSASUniversityEdition
1.4SASFundamentals
1.4.1SASLanguageBasics
1.4.2SASDATAandPROCSteps
1.4.3SASLibrariesandDataSets
1.4.4TheSASLog
1.5OutputDeliverySystem
1.6SASLanguageBasics
1.6.1SASLanguageStructure
162SASNamingConventions
1.7ChapterNotes
1.8Exercises
1.1Introduction
ThischapterintroducesbasicconceptsaboutSASthatarenecessarytouseiteffectively. ThischapterbeginswithanintroductiontosomeoftheavailableSASenvironmentsand describesthebasicfunctionalityofeach.EssentialsofcodinginSASarealsointroduced throughsomepre-constructedsampleprograms.Theseprogramsrelyonseveraldatasets, someprovidedwithSAS,othersareprovidedseparatelywiththetextbook,including
thosethatformthebasisforthecasestudyusedthroughoutChapters2through7. Therefore,thischapteralsointroducesSASdatasetsandlibraries.Inaddition,an introductiontodebuggingcodeisincluded,whichincludesadiscussionoftheSASlog wherenotes,warnings,anderrormessagesareprovidedforanycodesubmitted.
1.2LearningObjectives
ThischapterprovidesabasisforworkinginSAS,whichisanecessaryfirststepfor successfulmasteryofthematerialcontainedintheremainderofthisbook.Indetail,itis expecteduponcompletionofthischapterthatthefollowingconceptsareunderstood withinthechosenSASenvironment:
Demonstratetheabilitytoopen,edit,save,andsubmitaSASprogram
ApplytheLIBNAMEstatementtocreateauser-definedlibrary includingtheBookDatalibrarythat containsallfilesforthistext,downloadablefromtheAuthorPage Demonstratetheabilitytonavigatethroughlibrariesandviewdatasets ThinkcriticallyaboutallmessagesSASplacesinthelogtodeterminetheircauseandseverity ApplyODSstatementstomanageoutputandoutputdestinations ExplainthebasicrulesandstructureoftheSASlanguage Demonstratetheabilitytoapplyatemplatetocustomizeoutput
Usetheconceptsofthischaptertosolvetheproblemsinthewrap-upactivity.Additional exercisesandcase-studiesarealsoavailabletotesttheseconcepts.
1.3SASEnvironments
InteractingwithSASispossibleinavarietyofenvironments,includingSASfromthe commandline,theSASwindowingenvironment,SASEnterpriseGuide,SASStudio,and SASUniversityEdition;withmostofthesebeingavailableonmultipleoperatingsystems. ThischapterintroducestheSASwindowingenvironment,SASStudio,andSAS UniversityEditionontheMicrosoftWindowsoperatingsystemandpointsoutkey differencesbetweenthoseSASenvironments.Forfurtherspecificsondifferencesacross SASenvironmentsandoperatingsystems,consulttheappropriateSASDocumentation.In nearlyallexamplesinthisbook,codeisgivenoutsideofanyspecificenvironmentand outputisshowningenericRTF-styletablesorstandardimageformats.Outputmayvary somewhatfromthedefaultstylesacrossSASenvironmentsonvariousoperatingsystems, andexampleslaterinthischapterdemonstratesomeofthesedifferences.Laterchapters giveinformationabouthowtoduplicatethetablestyles.
1.3.1TheSASWindowingEnvironment
TheSASwindowingenvironmentisshowninFigure1.3.1withthreewindowsvisible: Log,Explorer,andEditor(commonlyreferredtoastheEnhancedProgramEditor).The ResultsandOutputwindowsaretwootherwindowscommonlyavailablebydefault,but aretypicallyobfuscatedbyotherwindowsatlaunch.Whencodethatgeneratesoutputis executed,thesewindows(andpossiblyothers)becomerelevant.
Figure1.3.1:SASWindowingEnvironmentonMicrosoftWindows

IntheMicrosoftWindowsoperatingsystem,themenuandtoolbarsintheSAS windowingenvironmenthaveasimilarlookandfeelcomparedtootherprogramsrunning onWindows.ExploringthemenusrevealsstandardoptionsundertheFile,Edit,andHelp menus(suchasOpen,Save,Clear,Find).TheView,Tools,Solutions,andWindow menushavespecializedoptionsrelatedtowindowsandutilitiesthatarespecifictoSAS.
TheRunmenuisdedicatedtosubmissionsofSAScode,includingsubmissionstoa remotesession.Asistypicalinmostapplications,toolbarbuttonsinSASprovidequick accesstocommonmenufunctionsandvarydependingonwhichwindowisactiveinthe session.Somemenuandtoolbaroptionsarereviewedbelowduringtheexecutionofthe suppliedsamplecodegiveninProgram1.3.1.Thissamplecodeisavailablefromthe authorwebpagesforthisbook.
Chapter1:IntroductiontoSAS
Program1.3.1:DemonstrationCode
optionsps=100ls=90numberpageno=1nodate; datawork.cars; setsashelp.cars;
mpgcombo=0.6*mpgcity+0.4*mpghighway; select(type);
when(‘Sedan’,’Wagon’)typeB=’Sedan/Wagon’;
when(‘SUV’,’Truck’)typeB=’SUV/Truck’; otherwisetypeB=type; end;
labelmpgcombo=’CombinedMPG’typeB=’SimplifiedType’; run;
title‘CombinedMPGMeans’; procsgplotdata=work.cars; hbartypeB/response=mpgcombostat=meanlimits=upper; wheretypeBne‘Hybrid’;
Chapter1:IntroductiontoSAS
run; title‘MPGFive-NumberSummary’; title2‘AcrossTypes’; procmeansdata=carsminq1medianq3maxmaxdec=1; classtypeB; varmpg:; run;
Afterdownloadingthecodetoaknowndirectory,therearemultiplewaystonavigateto andopenthiscode.Figure1.3.2showstwomethodstoopenthefile,eachrequiringthe Editorwindowtobeactive.
Figure1.3.2:MethodsforOpeningSASCodeFilesintheSASWindowingEnvironment

EitherofthesechoiceslaunchesastandardMicrosoftWindowsfileselectionwindow, whichisusedtonavigatetoandselectthefileofinterest.Uponsuccessfulselectionof thecode,itappearsintheEditorwindow,andisdisplayedwithsomecolorcodingas showninFigure1.3.3(assumingtheEnhancedProgramEditorisinuse,theProgram Editorwindowprovidesdifferentcolorcoding).Itisnotimportanttounderstandthe specificsyntaxorhowthecodeworksatthispoint,fornowitisusedsimplytoprovide anexecutableprogramtointroducesomeSASfundamentals.
Codesubmissioncanalsooccurinmultipleways,twoofwhichareshowninFigure 1.3.3,againeachmethodrequirestheEditorwindowtobetheactivewindowinthe session.IfmultipleEditorwindowsareopen,onlycodefromtheactivewindowis submitted.

Typically,afteranycodesubmissiontheResultswindowactivatesanddisplaysanindex oflinkstovariousentitiesproducedbytheprogram,includingoutputtables.Whilenotall SAScodegeneratesoutput,Program1.3.1does,anditmayberoutedtodifferent destinations(andpossiblymorethanonedestinationsimultaneously)dependingonthe versionofSASinuseandcurrentoptionsettings. Chapter1:IntroductiontoSAS
InSAS9.4,thedefaultsettingsrouteoutputtoanHTMLfilewhichisdisplayedinthe ResultsViewer,aviewingwindowinternaltotheSASsession.PreviousversionsofSAS relyontheOutputwindowfortables,anoptionwhichremainsavailableforuseinthe SAS9.4windowingenvironment,andotherspecializeddestinationsforgraphics.Default outputoptionscanbesetbynavigatingtotheToolsmenu,selectingOptions,followedby Preferencesfromthatsub-menu,andchoosingtheResultstabinthewindowthat appears,asshowninFigure1.3.4.
Figure1.3.4:ManagingOutputforProgramSubmissions

Amongotheroptions,Figure1.3.4showstheoptionforCreateHTMLcheckedand CreateListingunchecked.Fortables,thelistingdestinationistheOutputwindow,so whenCreateListingischecked,tablesalsoappearintheOutputwindowinwhatappears asaplaintextform.Itispossibletocheckbothboxes,anditisalsopossibletocheck neither,whicheverispreferred.
Intheremainderofthisbook,outputtablesareshowninanRTFformembeddedinside thebooktext,outsideofanySASResultswindow.Appearanceofoutputtablesand graphsinthebookissimilartowhatisproducedbyaSASsession,butisnotnecessarily identicalwhendefaultsessionoptionsareinplace.Laterinthischapter,theabilitytouse
SAScodetocontroldeliveryofoutputtoeachofthesedestinationsisdemonstrated, alongwithuseofthelistingdestinationasanoutputdestinationforgraphicsfiles.
1.3.2SASStudioandSASUniversityEdition
SASStudioandSASUniversityEdition(whichare,fortheremainderofthistext, singularlyreferredtoasSASUniversityEdition)interfacewithSASthroughaweb browser.Typically,thebrowserusedisthedefaultbrowserforthemachinehostingthe SASUniversityEditionsession,butthisisnotarequirement.Figure1.3.5showsatypical resultoflaunchingSASUniversityEdition(inthiscaseusingtheFirefoxbrowseron MicrosoftWindows),launchinginvisualprogrammermodebydefault.Aclosermatchto thestructureoftheSASwindowingenvironmentisprovidedbyselectingSAS Programmerfromthetoolbarasshown.
Figure1.3.5:SASUniversityEdition

OpeningaprogramisaccomplishedviatheOpenicononthetoolbar,asillustratedin Figure1.3.6,andtheopenedcodeisdisplayedinamannerverysimilartothethatofthe EnhancedProgramEditordisplayshowninSection1.3.1. Chapter1:IntroductiontoSAS
Chapter1:IntroductiontoSAS
Figure1.3.6:OpeningaPrograminSASUniversityEdition

Thoughinadifferentposition,thetoolbariconforsubmissionisthesameasintheSAS windowingenvironment,andselectingitproducesoutputintheResultstabasshownin Figure1.3.7.
Figure1.3.7:ExecutionofaPrograminSASUniversityEdition

AfewimportantdifferencestonoteinSASUniversityEdition:first,theoutputis displayedstartingatthetop,ratherthanatthebottomofthepageasintheSAS windowingenvironment.Second,thereisanadditionaltabforOutputDatainthis session InSection143,libraries,datasets,andnavigationtoeacharediscussed; however,SASUniversityEditionalsoincludesaspecialtabwheneveraprogram generatesnewdatasets,whichaidsindirectlyviewingthoseresults.Finally,notethatthe Code,Log,Results,andOutputDatatabsarecontainedwithintheProgram1.3.1tab, andeachprogramopenedisgivenitsownsetoftabs.Incontrast,theSASwindowing environmentsupportsmultipleEditorwindowsinasinglesession,buttheyallsharea commonLogwindow,Outputwindow,and(underdefaultconditions)outputHTMLfile. AsdiscussedinotherexamplesandinChapterNotes1and2inSection1.7,submissions fromanyandallEditorwindowsintheSASwindowingenvironmentarecumulativein theLogandOutputwindows;therefore,managingresultsineachenvironmentisquite different.
1.4SASFundamentals
TobuildaninitialunderstandingofhowtoworkwithprogramsinSAS,Program1.3.1is usedrepeatedlyinthissectiontointroducevariousSASlanguageelementsandconcepts. ForbothSASwindowingenvironmentandSASUniversityEdition,thefeaturesofeach
environmentandnavigationwithinthemarediscussedinconjunctionwiththelanguage elementsthatrelatetothem.
1.4.1SASLanguageBasics
Program1.4.1isaduplicateofProgram1.3.1withcertainelementsnotednumerically throughoutthecode,followedbynotesonthespecificcodeintheindicatedposition. Throughoutthisbook,thisstyleisusedtodetailimportantfeaturesfoundinsamplecode.
Program1.4.1:Program1.3.1,Revisited
optionsps=100ls=90numberpageno=1nodate; datawork.cars;
setsashelp.cars;
MPGCombo=0.6*mpgcity+0.4*mpghighway; select(type);
when(‘Sedan’,’Wagon’)TypeB=’Sedan/Wagon’; when(‘SUV’,’Truck’)TypeB=’SUV/Truck’; otherwiseTypeB=type; end;
labelmpgcombo=’CombinedMPG’typeB=’SimplifiedType’; run;
title‘CombinedMPGMeans’; procsgplotdata=workcars;
hbartypeB/response=mpgcombostat=meanlimits=upper; wheretypeBne‘Hybrid’; run;
Chapter1:IntroductiontoSAS
title‘MPGFive-NumberSummary’;
title2‘AcrossTypes’; procmeansdata=work.carsminq1medianq3maxmaxdec=1; classtypeB; varmpg:; run;