1 / 46

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

SAS Enterprise Guide Best of Both Worlds – Is it Right for You ? Sunil Gupta Sunil@GuptaProgramming.com 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

grazia
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAS Enterprise Guide Best of Both Worlds – Is it Right for You? Sunil Gupta Sunil@GuptaProgramming.com www.SASSavvy.com

  2. SAS Display Manager World SAS Enterprise Guide World

  3. What’s in a Name? SAS Same Power as base SAS EnterpriseWide scope and integration with data source and output channels within ONE file GuideStandardize and automate tasks and queries, execute difficult or infrequently used SAS Procedures Free with PC SAS

  4. What type of SAS User are you? New/Experienced SAS Programmer – Create and run SAS programs Statistician – Exploratory statistical analysis, graphic templates Manager – 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 data Data Management Query Builder and Edit Checks with Proc SQL Data Reporting Tasks Drag-n-Drop, Proc Tabulate, Proc Transpose Data Analysis ODS Statistical Graphics

  6. Interface 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.

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

  8. SAS Enterprise Guide: The Basics Point-and-Click SAS Programming Required! All results are saved to one project file! Drag-and-Drop

  9. SAS Enterprise Guide: The Basics Single Data set Automatic access to current data Enterprise Guide Task Update SAS programs from within Enterprise Guide SAS Programs Store all within one project file – program, log, & list. Access results within one project file – RTF, PDF, & HTML.

  10. SAS Enterprise Guide: The Basics • Follows a Typical Process Flow • Enterprise Guide tasks make programming easier! Access Raw Data Create Query, Merge Data sets Create Variables, Formats Analysis & Reporting Results as RTF, HTML, etc.

  11. Process Flow Diagram

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

  13. Simulate SAS Display Manager

  14. Enterprise Guide Task List • - Select by Category • - Select by Task Name* - Select by Toolbar - Create RTF, HTML, PDF, etc. - Change the Output Style

  15. Enterprise 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!

  16. Enterprise Guide Task List • Select by Toolbar - Descriptive - List Data - Summary Statistics etc. - Table Analysis etc. Alternative to directly using SAS Procedures

  17. Behind the scenes

  18. Behind the scenes

  19. Enterprise 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 query

  20. Which 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 TABDescription* 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 Product’ * Instructions Required

  21. SAS 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.

  22. I. 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; * Programmer’s task - ex. proc report Key Point: Access data sets and assign formats

  23. II. 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 requests Proc SQL

  24. Create Query Task:Merge Data Sets A B • Points to data set (does not copy the data set) • Be careful NOT to move the source data sets • Can create new permanent data set • Single data set or query is required for tasks C

  25. II. 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.

  26. III. Analysis and Reporting Tasks Analysis & Reporting Tasks Description__________ Summary Table Sales Statistics Table, ex. proc tabulate Listing Detail Sales Listing, ex. proc print Statistical Analysis Differences in yearly sales? ex. proc t-test Graphs 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 file

  27. SAS 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.

  28. Query Exploration and Management Intermediate Datasets [Select Variables, Subset Condition, and Sort Order] (DATA step update to LAB2) (DATA step update to LAB) How do you think dates are selected? Recreate Queries

  29. Graph Task: Chart Gallery SAS Programming

  30. Typical Business Model Different Viewpoints of the Same Data Viewpoint Example Question________________ Customer Which are the most profitable customers? Product What are the product sales across market segments – Retail/Catalog? Organization How successful are the marketing and sales campaign promotions? Once a table is created, it is easy to change the table to a different viewpoint!

  31. Selecting Analysis and Reporting Tasks How well do you know your business? You’ve got questions, Enterprise Guide has answers! WHICH IS THE BEST ? PRODUCT?- Shoes CUSTOMER?- Acme REGION?- Northern MARKET SEGMENT?- Retail Sales TIME PERIOD?- 4th Quarter, 2001 PRODUCT GROWTH?- Slippers

  32. 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. continue …

  33. 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. continue …

  34. 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. Build Your Own Best Practice Tips

  35. SOP Compliance and Best Practices

  36. Characterize Data Task – Categorical Data Automatic for both character and numeric variables. Can specify number of unique values to display.

  37. Characterize Data Task – Continuous Data Automatic for each numeric variable.

  38. Characterize Data Task – Continuous Data Option to display as graphs or save as dataset.

  39. SAS Programmers Tool - Syntax proc 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.

  40. Moving EG Code to Production • All 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 (Programmer’s Task) • SAS EG 4.3 has fill-in editor and WHERE tab

  41. SAS Enterprise Guide’s Top Three Unknown Benefits

  42. On-Demand SAS Demos

  43. SASSavvy.com: Top SAS Enterprise Guide Papers

  44. SAS Enterprise Guide Best of Both Worlds – Is it Right for You? Sunil Gupta Sunil@GuptaProgramming.com www.SASSavvy.com

More Related