SAS Enterprise Guide: A Revolutionary Tool! Jennifer First 2997 Yarmouth Greenway Drive, Madison, WI 53711 Phone: (608) 278-9964 Web: www.sys-seminar.com
SAS Enterprise Guide For All! COPYRIGHT 2011 Systems Seminar Consultants, Inc. All rights reserved. Printed in the United States of America. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without prior written permission of SSC. SAS is a registered trademark of SAS Institute Inc. in the USA and other countries. The Missing Semicolon is a trademark of Systems Seminar Consultants, Inc. 2
Welcome to Systems Seminar Consultants, Inc. Systems Seminar Consultants, Inc. is a SAS Alliance Quality Partner of SAS. Our team of SAS software experts has a broad base of knowledge and experience working with a variety of complex systems in a number of diverse industry settings. This knowledge and experience is leveraged to help you effectively achieve your business goals. Free SAS Newsletter Our popular publication, The Missing Semicolon, shares SAS software solutions developed by our staff and provides additional technical assistance to our customers. SAS Training Services For over 1,000 students each year, we make SAS software easier to understand, use, and support. Public training schedules are posted on our web site. Private on-site training options are also available. 3
What is SAS Enterprise Guide? Interface for SAS Software Can code SAS programs Point-and-click interfaces to modify, analyze, and report data Organize code, results, and logs in a Process Flow 4
Parts of Enterprise Guide Menu Bar Project Tree Task List Process Flow Work Area Task Status Window 5
SAS Enterprise Guide Is For Everyone! Increase the efficiency of your programmers Empower analysts with SAS Guided Analytics Organize all SAS processes Easily create attractive, useful graphs Package and distribute reports EG is an Enterprise Wide Solution that truly has something for everyone! 6
Liberate Analysts Many analysts don t have an IT background No time to learn expert coding Conduct data manipulation, analysis, and distribute reports Struggle to complete tasks without extensive knowledge of coding 7
Liberate Analysts (continued) No IT staff dedicated to SAS support Busy IT staff, managing a heavy workload Analysts create own SAS processes. Analysts wait for simple queries, reports, and small modifications. Analysts can complete many tasks on their own with EG. 8
Accessing Data for Analysts Access a variety of data sources, including SAS, Excel, and databases. Access virtually any data source, across platforms, with the appropriate privileges and SAS products Can be done through a GUI 9
Adding a SAS Data Set to a Project File menu, select Open Data. Select Local Computer or SAS Servers. Navigate to the location of the data set. Highlight the data set name. Click Open. 10
Adding a SAS Data Set to a Project The data table is open in the Work Area. Icons representing the data table appear in the Process Flow and Project Tree. The data table can be used in tasks and queries. 11
Libraries and Data To view the data available on a server: Double-click a server name on the Server List. Double-click Libraries. Double-click a library name. The data sets available in the library will be listed below the library name. 12
Excel Import Data Wizard As data is imported, it can be modified: dropping fields, changing variable attributes, which worksheet or cells to import, and more. All without any coding! 13
Changing Column Properties Name: name of the variable. SAS naming restrictions apply. Label: text that is sometimes displayed in place of the variable s name. Type: character or numeric. Length: maximum length of the data values, in bytes. Informat*: determines how the data is read in. Format*: determines how the data is displayed. Include in output: determines whether the variable will be included in the resulting SAS data set. 14
Text Format (fixed width) If the data is fixed width: Highlight Fixed Columns. Click the ruler above the sample text to denote the column divisions. 15
Text Format (delimited) If the data is delimited: Under Text format, select Delimited. Select the appropriate delimiter. 16
Tasks A task: Is a specific action executed on data. Can be customized through a step-by-step process, then run or saved. Is analogous to a procedure in SAS. Tasks can be used to: Analyze and classify data. Compute statistics and carry out statistical tests. Create tables and reports. Generate graphs. 17
Available Tasks (includes statistical tasks!) Append Table Area Plot ARIMA Modeling and Forecasting Task Bar Chart Bar Line Chart Basic Forecasting Task Box Chart Task Box Plot Bubble Plot Canonical Correlation Task CDF Plots Task Characterize Data Cluster Analysis Task Compare Data Task Contour Plot Correlations Task Create a Chart Create Format Task Create Map Feature Table Create Time Series Data Data Set Attributes Delete Data Sets and Formats Discriminant Analysis Task Distribution Analysis Task Donut Chart Factor Analysis Task Generalized Linear Models Histograms Task Import Data Task Individual Measurements Chart Library Assignment Wizard 18
Available Tasks (continued) Life Tables Task Line Plot Linear Models Task Linear Regression Task List Data Task Logistic Regression Task Map Graph Mean and Range Chart Task Mean and Standard Deviation Chart Task Mixed Models Model Scoring Nonlinear Regression Task Nonparametric One-Way ANOVA Task np Chart Task One-Way ANOVA Task One-Way Frequencies Task p Chart Task Pareto Chart Task Pie Chart Task P-P Plots Task Prepare Time Series Data Task Principal Components Task Probability Plots Task Proportional Hazards Q-Q Plots Task Radar Chart Random Sample Task Rank Task Regression Analysis of Panel Data Task 19
Available Tasks (continued) Regression Analysis with Autoregressive Errors Task Scatter Plot Sort Data Task Split Columns Task Stack Columns Task Standardize Data Task Summary Statistics Task Summary Tables Task Surface Plot t Test Task Table Analysis Task Transpose Task u Chart Task 20
Opening Task Windows In the Process Flow or Project Tree, highlight a data set. Select a task from the Task List or the Tasks menu. 21
The Selection Pane The Selection Pane: Is on the left side of the Task Window. Lists available options for the task. S e l e c t i o n P a n e l 22
Task Options In the Task Window, you may: Edit and filter data Assign variables to task roles, which determine how variables will be used in the task. Make selections specific to the task by dragging and dropping columns from the Columns to assign window to the Task Roles Window. 23
Saving Tasks Saving a task: Saves all task roles and options associated with the task. Does not execute the task. Does not generate output. Closes the Task Window. Creates objects for the task in the Process Flow and Project Tree. The task has been saved but not run, so only the data and task appear in the Process Flow. No output has been generated. 24
Running Tasks Running a task: Saves all task roles and options associated with the task. Executes the task according to the options you have specified. Generates results. Closes the Task Window. Creates objects in the Process Flow and Project Tree for the task and results. The task has been run, so output now appears. 25
Warnings and Errors Warnings are denoted by a yellow triangle over the task icon. Errors are denoted by a red X over the task icon. 26
Warnings and Errors To view the log for a task: In the Process Flow, find the name of the task. Under the task name, double click the Log node. Or double click the task. 27
Modifying Tasks Reopen the task, double click the Modify Task tab. Change any task roles, options, or settings. Click Run. When asked, Would you like to replace the results from the previous runs? click Yes or No. 28
My Favorite Task The Query Builder! Query Builder is a graphical way analysts can: Join tables Select variables Filter data Sort data Change data source Compute columns Set up prompts De-dup observations Change query options Add titles, footnotes Limit output And more 29
Query Building for Analysts Intuitive, easy to understand and use, eliminates coding errors Queries become easy for non-programmers. Simple tasks don t require the support of a SAS programmer. Query Builder builds code that can be reused and modified. 30
Adding Columns to a Query Double-click or drag columns on the Tables list to add them to the query. The and buttons move columns up and down on the Select Data tab. The button deletes columns. Select name of dataset to select all columns. 31
Changing Column Attributes On the Select Data tab, highlight a column name. Click the Properties button ( ). 32
Sorting Double-click additional variables on the Tables list to add them to the Sort Data tab. Use the and buttons to arrange the variables in order of sort priority. 33
Replacing Discrete Values The new column will appear on both the Tables list and the Select Data tab. It can be manipulated in the same ways as other columns in the query. 34
Replacing a Range of Values 35
Adding a New Computed Column Build an expression. Specify additional options, including a new column name, alias, and format. 36
Adding a New Computed Column The new column will appear both on the Tables list and the Select Data tab. It can be manipulated in the same ways as other columns in the query. 37
Adding a Summary Column In the Query Builder, highlight a variable on the Select Data tab. Select a Summary Statistic from the Summary drop-down menu. 38
Filtering Data in a Query Click the Filter Data tab. On the Tables list on the left, double-click a variable to open the Edit Filter window. This variable will be the left side of the filter condition. 39
Combining Filters You can combine filters with And, OR 40
Joining Tables EG will find join key or can manually specify Choose what type of join and other options 41
Code Generated By SAS Enterprise Guide The Query Builder is generating PROC SQL behind the scenes! Use the code or modify it. 42
Selecting Query Results Format On the Tools menu, select Options. On the Selection Pane, highlight Query. Under Save query result set as, click the drop-down menu. Select Data Table, Data View or Report. Click OK. 43
Working with Query Results Tasks may be run on query results if you have specified data table or data view as your output option. To run a task on query results: In the Process Flow or Project Tree, highlight the query results. From the Task List, select a task and proceed as usual. 44
Analysis: Summary Statistics (PROC MEANS) From the Variables to assign list on the left, drag all desired Analysis variables to the Analysis variables task role on the right. 45
Selecting Statistics to Calculate On the Selection Pane, highlight Basic under Statistics Check the appropriate boxes to select statistics. Use the drop-down menu to indicate how many decimal places to include. 46
Assigning Classification Variables From the Variables to assign list on the left, drag all desired Classification variables to the Classification variables task role on the right. 47
Adding a Footnote and Title Can even use a macro variable! 48
Output Click Run to run the task. 49
The Table Analysis Task: PROC FREQ The Table Analysis Task creates two- and three-way Frequency Tables. 50
Reporting for Analysts Analysts may depend on others to create simple reports. For simple changes, they need further assistance. Analysts leverage SAS reporting capabilities in an easy GUI, creating custom reports and templates PROC PRINT 51
Summary Reports: PROC Tabulate Once variables are assigned to task roles, you can begin arranging the elements of the table in the Preview Area. One or two dimensions, concatenation and crossing, analysis and classification variables, and statistics! 52
Summary Report/PROC TABULATE Output 53
Easily Create Useful, Beautiful Graphs Creating graphs is simple with EG s interface! No SAS/GRAPH syntax Completed in a fraction of the time Bar charts Pie charts Line plots Scatter plots Area plots Donut charts Bubble plots Contour plots Box plots And more 54
Graph Interface 55
A Graph Created in SAS Enterprise Guide Easily create graphs within SAS Can be interactive! 56
Simple Reporting HTML, PDF, RTF, SAS Report, and Text CSS s that define styles, fonts, color, and include pictures Each element easy to manipulate Store and reuse templates. Develop custom templates. Easily create attractive, consistent reports across enterprise 57
Packaged Reports Easy to package reports! With a few clicks, package multiple reports Charts, titles, text, images, and more Email or schedule for distribution 58
Example of a Packaged Report 59
SAS Process Organization Organizing SAS process (programs, data, reports, logs, and documentation) into one flowchart like file, called a Project. Simplifies comprehension, updates, and standards across organization Base SAS processes can be imported into a Project. 60
Creating Ordered List Specifies what order items in Process Flow will be run. 61
Schedule a Process Flow 62
Analysts Can Transition Into Programming Use GUI for the majority of tasks Generate shell code and learn how to program as necessary Leveraging Enterprise Guide Wizards Using Shell Code Maximum Efficiency Understanding SAS Process/ Easier Debugging 63
Continued Role of Analyst Support By IT IT Complex data manipulations Specialized reports Production processes Other complex issues Analysts Simple queries Accessing data Simple reporting and graphs Graphing 64
Increase Programmer s Efficiency EG for heavy lifting Wizards to join tables, creating reports, and querying data Quicker than coding from scratch Less error prone 65
Increase Programmer s Efficiency Easy to misspell a word or miss a comma Cumbersome to join several tables (EG can do up to 32 tables at once!). Join tables within a wizard in a fraction of the time. 66
Code Generated By SAS Enterprise Guide Increase efficiency by leveraging wizards with programming knowledge Leveraging Enterprise Guide Wizards Using Shell Code Maximum Efficiency 67
New Programmer Features in Enterprise Guide 4.3 Integrated Syntax Help Using mouse-over or clicking F1 over a SAS keyword will display syntax for the keyword, as well as a description 68
New Programmer Features in Enterprise Guide 4.3 Syntax Suggestion When typing a SAS keyword, SAS will display a list of potential keywords to use in code. More Exciting New Features Displaying libraries and data members, parentheses matching, program formatting, and more! These new features will change the programming experience of every programmer, from novice to expert. 69
Missing Functionality Some functionality is not available or is limited in EG: DDE X STATEMENT AND SYSTASK (need special permission from administrator) SAS/AF Applications %WINDOW Statements, PROMPT options on LIBNAME statements, and interactive environments such as the Report window DATA step debugger SAS statements that require user interaction and that do not work well in a SAS batch program THE ENDSAS STATEMENT Lots of documentation and ideas about how to address these items 70
Internal Resistance Experienced users have processes that work. If it s not broke, why fix it? Analysts may fear it is technical and they will not be able to use it. 71
Solution to Resistance Hands-On Time! Programmers Use current processes and streamline future development. Analysts Achieve results with ease Everyone will fall in love 72
Logistics of Implementation Part of Base SAS PC product Many have EG and aren t aware May need IT for installation or environment support Additional products may be needed to access data and other platforms. 73
Conclusion Something for everyone Streamline and standardize processes Increase efficiency and capabilities. Some resistance at first Once users get some hands-on time, they will never go back. Enterprise Guide is truly an enterprise wide software for the future! 74
Additional Reading Bangi, Audimar. 2010. SAS Programmer's Paradise: New Goodies in SAS Enterprise Guide 4. Proceedings of the SAS Global 2010 Conference. Cary, NC: SAS. Available at http://support.sas.com/resources/papers/proceedings10/137-2010.pdf. The Little SAS Book for Enterprise Guide 4.2, Slaughter and Delwiche The SAS Dummy Blog: http://blogs.sas.com/sasdummy/ The Missing Semicolon: www.sys-seminar.com 75
Contact Us SAS Training, Consulting, & Help Desk Services 2997 Yarmouth Greenway Drive Madison, WI 53711 (608) 278-9964 www.sys-seminar.com Jennifer First Director of Operations jfirst@sys-seminar.com 76