Audience - RxJS, Ggplot2, Python Data Persistence, Caffe2 .

Transcription

SASAbout the TutorialSAS is a leader in business analytics. Through innovative analytics, it caters to businessintelligence and data management software and services. SAS transforms data into insightwhich can give a fresh perspective to business.Unlike other BI tools available in the market, SAS takes an extensive programmingapproach to data transformation and analysis rather than a drag-drop-connect approach.This makes it stand out from the crowd with enhanced control over data manipulation.SAS has a very large number of components customized for specific industries and dataanalysis tasks.AudienceThis tutorial is designed for all those readers who want to read and transform raw data toproduce insights for business using SAS. Readers who aspire to become Data Analysts orData Scientists can also draw benefits from this tutorial.PrerequisitesBefore proceeding with this tutorial, you should have a basic understanding of ComputerProgramming terminologies. A basic understanding of any of the programming languageswill help you understand the SAS programming concepts. Familiarity with SQL will be anadded benefit.Disclaimer & Copyright Copyright 2016 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I)Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republishany contents or a part of contents of this e-book in any manner without written consentof the publisher.We strive to update the contents of our website and tutorials as timely and as precisely aspossible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of ourwebsite or its contents including this tutorial. If you discover any errors on our website orin this tutorial, please notify us at contact@tutorialspoint.com.i

SASTable of ContentsAbout the Tutorial . iAudience . iPrerequisites . iDisclaimer & Copyright . iTable of Contents . ii1.SAS – Overview . 1Uses of SAS . 1Types of SAS Software . 3Libraries in SAS . 42.SAS – Environment. 5Download SAS University Edition . 5The SAS Environment . 143.SAS – User Interface . 15SAS Main Window . 15Code Autocomplete . 16Program Execution . 16Program Log . 17Program Result . 17Program Tabs. 184.SAS – Program Structure . 22SAS Program Structure . 22DATA Step . 22PROC Step . 23The OUTPUT Step . 23The Complete SAS Program . 24Program Output. 245.SAS – Basic Syntax. 26SAS Statements. 26SAS Variable Names. 26SAS Data Set . 27SAS File Extensions . 27Comments in SAS. 286.SAS – Data Sets . 29SAS Built-In Data Sets . 29Importing External Data Sets . 317.SAS – Variables . 35SAS Variable Types . 35Use of Variables in SAS Program . 36Using the Variables . 378.SAS – Strings . 39Declaring String Variables. 39String Functions . 40ii

SAS9.SAS – Arrays . 43Accessing Array Values . 44Using the OF operator . 44Using the IN operator . 4510. SAS – Numeric Formats . 47Reading Numeric formats . 47Displaying Numeric formats . 4811. SAS – Operators . 50Arithmetic Operators. 50Logical Operators. 51Comparison Operators . 52Minimum/Maximum Operators . 53Concatenation Operator. 54Operators Precedence . 5512. SAS – Loops . 56Flow Diagram . 56SAS – DO Index Loop . 57SAS – DO WHILE Loop . 58SAS – DO UNTIL Loop . 5913. SAS – Decision Making . 60SAS – IF Statement . 61SAS IF THEN ELSE Statement . 63SAS IF THEN ELSE IF Statement . 65SAS IF-THEN-DELETE Statement . 6614. SAS Functions . 68Function Categories . 68Mathematical Functions . 68Date and Time Functions . 69Character Functions. 70Truncation Functions . 71Miscellaneous Functions . 7215. SAS Input Methods. 74List Input Method . 74Named Input Method . 75Column Input Method . 76Formatted Input Method . 7716. SAS – Macros . 79Macro Variables. 79Local Macro Variable . 80Macro Programs . 81Commonly Used Macros . 82Macro % RETURN . 83Macro % END . 84iii

SAS17. SAS Date Times . 86SAS Date Informat . 86SAS Date output format . 87SAS DATA SET OPERATIONS . 8818. SAS Read Raw Data . 89Reading ASCII (Text) Data Set . 89Reading Delimited Data . 90Reading Excel Data . 91Reading Hierarchical Files . 9219. SAS Write Data Sets . 94PROC EXPORT . 94Writing a CSV file . 95Writing a Tab Delimited File . 9620. SAS Concatenate Data Sets . 9721. SAS Merge Data Sets . 103Data Merging . 10322. SAS Subsetting Data Sets . 107Subsetting Variables . 107Subsetting Observations. 10923. SAS Sort Data Sets . 111Reverse Sorting . 112Sorting Multiple Variables . 11324. SAS Format Data Sets . 115Using PROC FORMAT . 11625. SAS SQL . 118SQL Create Operation . 118SQL Read Operation . 119SQL SELECT with WHERE Clause . 120SQL UPDATE Operation . 121SQL DELETE Operation . 12326. SAS ODS .

operations on the SAS datasets to make proper reports for data analysis. Over the years SAS has added numerous solutions to its product portfolio. It has solution for Data Governance, Data Quality, Big Data Analytics, Text Mining, Fraud management, Health science etc. We can say that