getting the most out of sas ®enterprise guide the most out of sas enterprise... · work with...
TRANSCRIPT
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
2997 Yarmouth Greenway Drive, Madison, WI 53711
Phone: (608) 278-9964 • Web: www.sys-seminar.com
1
Getting the Most Out of SAS® Enterprise Guide®
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Questions, Comments
2
• Technical Difficulties: Call 1-800-263-6317
• We have several hundred attendees, so we won’t be able to answer
questions live.
• Please email questions or comments to [email protected].
• A copy of the presentation and a recording of the webinar will be emailed
out to attendees. This can be shared with people who did not attend.
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Systems Seminar Consultants, Inc.
Consulting, Training, and Support
• SAS
• SQL
• ETL
• Reporting Systems
• Business Analytics
• Data modeling
• Automating Processes
• “Big Data”
Apply good IT and systems practices to real life business applications.
Work with Marketing, Finance, Retail, Insurance, Utilities, Manufacturing,
Healthcare, Government organizations.
3
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Presenter – Jennifer First
• Strategic business planning
• Project management
• Sales and marketing management
• Development of custom training plans
• Marketing, Financial, Admin, HR management
• Publishes SSC's SAS technical newsletter, The Missing Semicolon
• Coordinates WISUG (Wisconsin SAS User Group) meetings
4
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Introduction
• SAS Enterprise Guide is an incredibly flexible tool, with many options,
items, and ways a user can leverage the tool.
• This presentation should have something for everyone:
• Definitions
• Options
• Organization and Documentation
• Leveraging Point and Click
• Graphing and Reporting
• Tips and Best Practices
• How should we be using EG?
5
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
What Is SAS Enterprise Guide?
6
• Enterprise Guide is an user interface for SAS.
• EG passes SAS code to a server to run the SAS code.
(whether you are writing code or using the tasks in EG)
• The server could be your local machine, a server on your network, it could
even be on another platform
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Enterprise Guide for the SAS Novice
• Immediately begin working with Enterprise Guide projects, tasks, and
wizards with no previous SAS experience.
• Perform analyses and queries and create reports that would normally
require extensive knowledge of SAS.
• Focus on the content of analysis rather than the details of coding.
7
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Enterprise Guide for the SAS Expert
• Avoid repetitive or trivial coding by using Enterprise Guide for simple
coding tasks.
• Modify the automatically generated code and use it as a springboard for
more complicated programs.
• Devote less time to searching for minor syntax errors.
• Organize SAS processes in one file.
8
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
What is a Project?
• An EG project is a single file. (.egp)
• Contains a set of data, tasks, code, and results.
• Only one project can be open at a time.
• All work in Enterprise Guide must be done within a project.
9
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
What is a Process Flow?
Project Process Flow 1
Data
Task
Program
Output
Notes
Logs
Process Flow 2
Data
Task
Program
Output
Notes
Logs
….
10
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
What Is A Task?
• A task is a point and click user interface that generates SAS code.
• Each task has an analogous PROC (although not 1 to 1 relationship).
11
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
• Under the Task List, select the drop-down and select “Tasks by Name.”
• EG will list the task name but on the right hand side will include the
analogous SAS Procedure (PROC).
Tasks vs. PROC’s
12
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Capabilities of EG
Enterprise Guide can be almost anything the user wants it to be:
ETL | Graphing | Analysis | Reporting | Scheduling
Automation | Statistics | Queries | SQL | Data Preparation
Quick Ad-Hoc Analysis
Business Analyst
Complex Production System
Expert SAS Coder
13
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
• Business background that used many SAS files
• Rely on busy programmers for basic reports (joining, concatenating,
summarizing, etc.)
• Cobbler’s child with no shoes!
My Background with SAS and EG
14
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
• About 6 years ago, discovered Enterprise Guide
• I could do 90% of my analytics myself
My Solution: Self Serve Analytics
15
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
EG at SSC
16
• Convincing the programmers…was not so easy
• 15 years+ of SAS experience- “If it’s not broke, why fix it?”
• Each programmer found something valuable in EG.
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
How Does One Use EG Most Effectively?
That depends what you are doing…
But we have a few ideas
17
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Customize Your View
On the View menu:
Task List, Server List, Project Tree, Notes, Prompt Manager, and more
18
Stacked Maximize Workspace
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Options Menu
• Many of Enterprise Guide’s options can be set up by going to the top menu
bar and selecting Tools, Options.
19
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Options - Project Views
How the Project Tree and Process Flow looks
• Group Stored Process and Program Items in Separate Folders
• Renaming Options
• Display Path of Data and Files
• Show Generated Code
• Show SAS Output Log
• Show Generated Results
20
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Options - Results
• Manage general results options
• Choose your result format: (SAS Report, RTF, HTML, PDF, Text, or a
combination)
• Set a limit on output data sets, page size, ODS Options, and more
• Change options for output graphs and stored processes
21
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Options - Results
Style Manager
Specify the look of any output, including background colors, font colors,
logos, table borders, and more.
22
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Options - Results
Style Editor
• Develop a custom style
• Text - size, color, alignment, background
• Border - colors, style
• Images – banner, background, watermark
23
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Data and Query Options
• General options – labels, default columns and rows, default output library, etc.
• Improve performance, such as how many rows to scan when importing data or
how wide to make columns
• Query options to improve efficiency and automation
• Can also insert custom code to run before or after a task or query
24
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Editor Options
Custom configure editor options (including new exciting autocomplete options),
display options, and more, to increase efficiency.
25
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Organization and Documentation
Why should you organize and document your EG project?
• Easier to understand
• Easier to debug and fix errors
• Easier to maintain
• Easier to make updates and changes
• Easier to pass it along or share with someone else
26
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
• Consider a Process Flow just for overall documentation.
• System documentation, maintenance logs, run time instructions, and wrap
up instructions.
Project Documentation
27
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Enterprise Guide Notes
• A text document that will appear as a project node in the Process Flow
and the Project Tree
• Can be associated with a data set, task, code module, output, or log or
can be independent
• Create a Note linked to each task used in the Project - what, who, when,
and why of the task.
28
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Enterprise Guide Notes
• Explain the purpose of multiple tasks working together, including
dependencies, and the overall purpose of the process.
• You may have one overall note per Process Flow or to document overall
pieces of your Project.
29
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Naming Conventions
• Good, consistent naming conventions are self documenting.
• Enterprise Guide will use default names like
‘WORK.QUERY_FOR_DAILY1’ and ‘Calculation’.
• Choose meaningful names, assign variable labels, and use good default
formats for numeric fields.
• This applies to data, variables, output, tasks, programs, and process
flows.
30
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
• Include documentation in your code!
• Use a header box and change log for each program.
• Comment as you develop code (or even before) but don’t wait until after.
• Especially focus comments on difficult code, such as complicated
calculations.
• Remember, especially in Enterprise Guide, a non-programmer may need
to read and decipher this code.
Code Documentation
31
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Multiple Process Flows
• You can use a “folder” equivalent in Enterprise Guide – the Process
Flow.
• Store many data sources, tasks, code, output, logs, and notes in a logical
way in separate process flows
• Dependent on the complexity of your process, company standards, and
your personal preferences.
32
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Multiple Process Flows
Logical Breaks
• Break up a Financial Projection system, into 3 Process Flows: Income
Projections, Expense Projections, and Production Projections.
• Each process flow has its own data, tasks, code, output, and notes.
• Easy to keep track of and make changes to
• Works well for a process that has logical pieces to it
33
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Functional Breaks
System level and how the process will be run.
1. Overall System Documentation
2. Startup Processes, including Assigning Libraries and Setting Options
3. Data Import, Data Cleanup, Data Preparation
4. Preliminary and Exploratory Analysis
5. Final Analysis
6. Graphing and Reporting
7. Production, Scheduling, and Distribution
Multiple Process Flows
34
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Process Flow Organization
• Each Process Flow should be organized and easy to read.
• Enterprise Guide automatically arranges each component of the Process
Flow. This option can be turned off.
• Then you can drag around any of the items in the Process Flow to make it
easier to read and in the order you want.
35
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Documentation and Organization
• An EG Project that is documented and organized is central to the success
of a process.
• Even for ad-hoc processes, someone may need to create a similar
process down the road and could reuse part of what the user is
developing.
• Easy to take shortcuts in the short term to rush and get something done.
• Putting a small amount of time into this area will yield great results long
term.
36
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Leveraging Point and Click Functionality
• Enterprise Guide was designed to simplify the life of a SAS user.
• Many use EG as a code editor, but there is a whole other world of things.
• Useful to new SAS users but are also provide incredible time savings and
simplification to expert SAS programmers.
37
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Excel Import Data Wizard
• Import and modify data-drop fields, change variable attributes, which
worksheet or cells to import, and more.
• All without any coding!
38
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
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.
39
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081 40
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.
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081 41
Text Format (delimited)
If the data is delimited:
• Under Text format, select Delimited.
• Select the appropriate delimiter.
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
My Favorite Task – The Query Builder!
Query Builder is a graphical way analysts can:
42
• 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
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Query Builder
• Intuitive, easy to understand and use, eliminates coding errors
• Query Builder builds code that can be reused and modified.
43
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081 44
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.
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Adding a New Computed Column
• Build an expression.
• Specify additional options, including a new column name, alias, and
format.
45
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Joining Tables
• EG will find join key or can manually specify
• Choose what type of join and other options
• Join up to 32 tables at once!
46
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Code Generated By SAS Enterprise Guide
• The Query Builder is generating PROC SQL behind the scenes!
• Use the code or modify it.
47
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Summary Reports: PROC Tabulate
• You can arrange your report in the the Preview Area.
• One or two dimensions, concatenation and crossing, analysis and
classification variables, and statistics!
48
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Summary Report/PROC TABULATE Output
49
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Characterize Data
• What variables do the data sets contain?
• What does the data look like?
Characterize Data Wizard creates:
• Summary report
• Graphs
• Frequency SAS data set
• Univariate SAS data set
50
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Characterize Data – Summary Reports
51
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Characterize Data - Graphs
52
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Keep these tables in a permanent library because…
• You can restart in the middle
• They’re useful for testing and debugging
• Disk space is cheap
Many Tasks Leads To Many Intermediate Tables
53
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Easily Create Useful, Beautiful Graphs
• Creating graphs is simple with EG’s interface!
• No SAS/GRAPH syntax
• Completed in a fraction of the time
54
• Bar charts
• Pie charts
• Line plots
• Scatter plots
• Area plots
• Donut charts
• Bubble plots
• Contour plots
• Box plots
• And more
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Graph Interface
55
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
A Graph Created in SAS Enterprise Guide
• Easily create graphs within SAS
• Can be interactive! You can change colors or change to a pie graph
without rerunning data
56
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Packaged Reports
• Easy to package reports!
• With a few clicks, package multiple reports
• Charts, titles, text, images, and more
• Email or schedule for distribution
57
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Example of a Packaged Report
58
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Enterprise Guide Project Backup
• EG projects are stored as a single binary file (not plain text)
• Always back up the .egp file
• Back up to plain text with “Export All Code…”
59
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
How Should An Analyst Use EG?
Use GUI for the majority of tasks
60
Leveraging Enterprise
Guide Wizards
Using Shell Code
Understanding SAS Process/
Easier Debugging
Maximum Efficiency
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
How Should An Analyst Use EG?
Learn how to program as necessary!
• Debugging
• Integrate macro variables
Include System Date in Report Title!
• Explore the world of SAS functions
Hundreds and hundreds of useful function for use in SAS
• Understand code that others have written
61
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
How Should A Programmer Use EG?
Don’t be afraid to use EG features!
Point and Click
• EG tasks have a consistent interface across all projects
• EG tasks constrain the user/developer to valid options and settings
• EG tasks minimize spelling and naming ambiguities
62
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Inserted Code
• Use tasks and code
How Should A Programmer Use EG?
63
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
How Should A Programmer Use EG?
Enhanced, Enhanced Editor
• Line is blurring between coding and GUI with new editor options
64
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Don’t Box Yourself In With EG
• If you are a programmer, try some point and click!
• If you are an analyst, don’t be afraid of code!
• Explore your options!
65
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Recommended Reading
• The Missing Semicolon: http://www.sys-seminar.com/newsletter
Monthly Enterprise Guide Tips
• Chris Hemedinger-The SAS Dummy
http://blogs.sas.com/content/sasdummy/
66
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Questions, Comments
• Please email questions or comments to [email protected] or
contact us at 1-800-997-7081.
• A copy of the presentation and a recording of the webinar will be emailed
out to attendees. This can be shared with people who did not attend.
67
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Upcoming Lunch and Learn
Introduction to SAS Macros
December 6, Noon Central
Steven First
We will email an invitation to our mailing list and attendees.
Please share invitation with others.
68
Getting the Most Out of SAS® Enterprise Guide® u www.sys-seminar.com u 1-800-997-7081
Contact Us
Jennifer First
Vice President
2997 Yarmouth Greenway Drive • Madison, WI 53711
(608) 278-9964
www.sys-seminar.com
69