sas enterprise guide best of both worlds – is it right for you ? sunil gupta

Download SAS Enterprise Guide  Best of Both Worlds  – Is it Right for  You ? Sunil Gupta

If you can't read please download the document

Upload: grazia

Post on 10-Jan-2016

41 views

Category:

Documents


5 download

DESCRIPTION

SAS Enterprise Guide Best of Both Worlds – Is it Right for You ? Sunil Gupta [email protected] www.SASSavvy.com. SAS Display Manager World. SAS Enterprise Guide World. What’s in a Name?. SAS Same Power as base SAS Enterprise Wide scope and integration - PowerPoint PPT Presentation

TRANSCRIPT

Customized Reports with SAS Output Delivery System (ODS)

SAS Enterprise Guide Best of Both Worlds Is it Right for You?

Sunil [email protected] Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming1SASSavvy.com

SAS Display Manager WorldSAS Enterprise Guide WorldSAS Display Manager WorldSAS Enterprise Guide WorldTechnicalNon-Technical, TechnicalRequires More Time for Programming Requires Less Time for Programming using up to 90 TasksOne Dataset/Program/Output File per windowCross Reference/Query Multiple Intermediate Datasets/Programs/ Output FilesOpen Programmers working environment(Interactive DATA Step Debugger)Controlled Analysts working environment (Defaults, Batch Processing)Non-Visual ProgrammingVisual Process Flow3

SAS Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming3SASSavvy.comWhats in a Name?SAS Same Power as base SASEnterprise Wide scope and integration with data source and output channels within ONE fileGuide Standardize and automate tasks and queries, execute difficult or infrequently used SAS Procedures

4

Free with PC SAS(A True Paradigm Shift in SAS Program one file makes it easier to become organized)SAS Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming4SASSavvy.comWhat type of SAS User are you?New/Experienced SAS Programmer Create and run SAS programsStatistician Exploratory statistical analysis, graphic templatesManager As is or running stored procedures

5

What types of programming tasks are supported?

Data Access Import data or Data Step to access excel , raw dataData Management Query Builder and Edit Checks with Proc SQLData Reporting Tasks Drag-n-Drop, Proc Tabulate, Proc TransposeData Analysis ODS Statistical Graphics

6

7Interface vs. Integrate SAS EG Camps

Run SAS Programs as separate files from one SAS EG project file. Trouble-shoot data issues with query management. Do not depend on SAS EG for production runs.

Embed SAS Programs within SAS EG. Use SAS EG tasks to help process data for analysis. Allow managers access to data and reports.

Productive PROC SQLCopyright (C) 2010, Sunil Gupta7How many of you are DATA Step die-hards, Proc SQL die-hards?

What If SAS EG Could?Help with querying and validating? Query exploration and managementHelp with documentation? More portable package format (Notes, SAS Program, List, Log and Output file)Enforce standards and automation? Fully compatible with SAS macros and menusHelp with prototyping table layouts and performing complex statistical analysis? Yes with feature to create custom tasks

8

What about validation and documentation?More portable format - Its in there with notes, traceability assures accountability and SAS package file (program, list, log and output file)

What about standards and automation?Fully compatible with SAS macros. Also supports stored processes for multiple users to enter macro parameter values from drop down menus.What about using SAS Enterprise Guide for prototyping table layouts and SAS code generators for SAS procedures or statistical tests that you are not familiar with?What about supporting non-technical clients with custom tasks?

SAS Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming8SASSavvy.com9SAS Enterprise Guide: The Basics

Point-and-Click Drag-and-Drop

SASProgrammingRequired!All results are saved to one project file!SASSavvy.comSAS Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming910SAS Enterprise Guide: The Basics

Update SAS programs from within Enterprise GuideSingle Data set Enterprise Guide TaskSAS ProgramsAutomatic access to current dataStore all within one project file program, log, & list.Access results within one project file RTF, PDF, & HTML.11SAS Enterprise Guide: The Basics Follows a Typical Process Flow

Enterprise Guide tasks make programming easier! Access Raw Data Create Query, MergeData setsCreate Variables,FormatsAnalysis& ReportingResults as RTF, HTML, etc.12Process Flow Diagram

13Enterprise Guide: The Interface EG Windows - Project, Task, Workspace

14Simulate SAS Display Manager

15Enterprise Guide Task List - Select by Category - Select by Task Name* - Select by Toolbar

- Create RTF, HTML, PDF, etc. - Change the Output Style

16Enterprise Guide Task List Select by Task Name* - MEANS - FREQ etc. * Many SAS procedures from SAS/BASE, SAS/GRAPH, SAS/STAT, SAS/ETS, SAS/QC

Ideal for programmers!

17Enterprise Guide Task List Select by Toolbar - Descriptive - List Data - Summary Statistics etc. - Table Analysis etc.

Alternative to directly using SAS Procedures18Behind the scenes

19Behind the scenes

20Enterprise Guide Task Rules Over 90 tasks to choose from

Each task is associated with a SAS Procedure- Simple Listing only for PROC REPORT Task may not contain all SAS Procedure options- Can copy and customize SAS code

Once you learn one task, other tasks are similar- Organized as tabs to specify variables and options

First access data set or query before selecting tasks- Task needs to know the variables to display

Assure all variables exist in single data set or query21Which are the most profitable products? Point-and-click the Sales data set to become active Point-and-click the Summary Tables Task Make the following tab selections

COLUMNS Assign SALES and QUANTITY as Analysis variables Assign CATEGORY and PRODUCT as Classification variables

TABLE Assign the following column variables: QUANTITY and SALES Assign the following row variables: CATEGORY and PRODUCT

RESULTS No need to save results to a data set

TITLES Enter text Table 1.1 Sales Statistics by ProductTABDescription** Instructions Required22SAS Enterprise Guide: Tasks I. Project Setup Tasks II. Data Management Tasks

III. Analysis and Reporting Tasks

Process Training Required.Logical sequence of events. Organized approach to non-programming.

23I. Project Setup Tasks Project Setup Tasks Description_________Create Code Assign Libname statement ex. libname dfile c:\data;

Create Code* Create data set ex. data test; etc.; run;

Create Format Create & Assign formats ex. proc format; etc.; run;* Programmers task - ex. proc reportKey Point: Access data sets and assign formats24II. Data Management Tasks Data Management Tasks Description_________Create Query Add variables and formats ex. salegrp, salegrp. Apply subset condition ex. 2002 sales data

Create Parameter Query* Add filter ex. Select a product

* Can easily create a basic user-friendly interface Key Point: Subset data set, create new variables, useful for ad-hoc requestsProc SQL25Create Query Task:Merge Data Sets

Points to data set (does not copy the data set)Be careful NOT to move the source data setsCan create new permanent data set Single data set or query is required for tasks

BA CSAS Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming25SASSavvy.com26II. Data Management Tasks: Parameter Query

Example of one user prompt to Select a Product. Can add more variables to restrict query. Returns data set with only products selected. Can use data set as source for EG tasks.

27III. Analysis and Reporting Tasks Analysis & Reporting Tasks Description__________Summary Table Sales Statistics Table, ex. proc tabulateListing Detail Sales Listing, ex. proc printStatistical Analysis Differences in yearly sales? ex. proc t-testGraphs How much have sales risen this year? ex. proc gchart

Key Points: Select the appropriate task, Query explore any intermediate dataset, Save all queries in project file28SAS Programming Options Four Points of Custom Program Entry ________1. Execute code when first opening project file such as setup.sas.2. Execute code before or after running a task.3. Insert custom code at predetermined points within a task to run with task. Examples include before or after DATA step or SAS Procedures and SAS Procedure statements or options. 4. Execute copied and customized generated code from task from a new program window.

Query Exploration and Management Intermediate Datasets[Select Variables, Subset Condition, and Sort Order]Recreate QueriesHow do you think dates are selected?(DATA step update to LAB2)(DATA step update to LAB)SASSavvy.comSAS Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming2930Graph Task: Chart Gallery

SAS Programming31 Typical Business Model Different Viewpoints of the Same Data

Viewpoint Example Question________________ Customer Which are the most profitablecustomers?

ProductWhat are the product sales acrossmarket segments Retail/Catalog?

Organization How successful are the marketingand sales campaign promotions?

Once a table is created, it is easy to change the table to a different viewpoint!

32Selecting Analysis and Reporting Tasks How well do you know your business?

Youve got questions, Enterprise Guide has answers!PRODUCT? - ShoesCUSTOMER? - AcmeREGION? - NorthernMARKET SEGMENT? - Retail SalesTIME PERIOD? - 4th Quarter, 2001PRODUCT GROWTH? - SlippersWHICH IS THE BEST ?SAS Enterprise Guide Best Practices Tips:1. Some level of training is required.2. Write to SAS programs instead of embedding the SAS programs to keep as separate files.3. Take advantage of Notes Task to document steps.4. Apply Save As instead of Save to prevent accidental replacement of another project file.5. Be careful when saving files when multiple projects opened.

33continue SAS Enterprise Guide Best Practices Tips:6. Take advantage of process flow diagram to visualize project code and tasks.7. Take advantage of split panel to simultaneously view dataset and SAS program.8. Take advantage of order list option to create batch jobs.9. Take advantage of viewing each HTML/RTF/PDF file, for example, when creating multiple files.10. For best debugging, keep all unique intermediate dataset names to view each data step sequence.

34continue SAS Enterprise Guide Best Practices Tips:11. Put on your data mining hat to query explore most any intermediate dataset created to confirm assumptions.12. Plan to follow a migration plan with your most open SAS programmers before your closed SAS programmers.35Build Your Own Best Practice Tips36

SOP Compliance and Best Practices Characterize Data Task Categorical Data37

Automatic for both character and numeric variables. Can specify number of unique values to display.Characterize Data Task Continuous Data38

Automatic for each numeric variable.Characterize Data Task Continuous Data39Option to display as graphs or save as dataset.

40SAS Programmers Tool - Syntaxproc report data=mydatea.sales nowd split="*" headline; column product year,(quantity sales pct_prd) quantity=grd_tot sales=grd_pct; define product / group 'PRODUCT'; define year / across 'Sales by Year' center; define quantity / sum 'N' center format=comma6.; define sales / sum 'Total' format=dollar8.; define pct_prd / computed '% Total' width=5 format=pctf.; define grd_tot / sum 'QNTY Total' format=comma6.; define grd_pct / sum 'SALES Total' width=5 format=dollar8.; compute before; gt1=_c3_; gt2 = _c6_; gt3 = _c8_; endcomp; compute pct_prd; _c4_ = (_c3_/gt1)*100; _c7_ = (_c6_/gt2)*100; endcomp; rbreak after / summarize skip ol ul; compute after; product = 'Total'; endcomp;run;Yes, you can write your own code.41Moving EG Code to ProductionAll Enterprise Guide code can be exported

Enhance EG code with style options

Very useful to develop prototype without writing code

For any task, select Preview Task Code

Create Code Task (Programmers Task)

SAS EG 4.3 has fill-in editor and WHERE tab

SAS Enterprise Guides Top Three Unknown BenefitsTop Four Unknown Benefits Brief Description Characterize DatasetAutomatic PROC FREQ and PROC MEANSSplit screen to view multiple windowsSee both program and dataset or log files Query Multiple Intermediate DatasetsSave sort and filters for each data reviewProduction RunsLink and run programs in sequence4243

On-Demand SAS Demos44

SASSavvy.com: TopSAS Enterprise Guide Papers45

SAS Enterprise Guide Best of Both Worlds Is it Right for You?

Sunil [email protected] Enterprise Guide Best of Both WorldsCopyright (C) 2011, Gupta Programming46Take a pollSASSavvy.com