O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SAS® Programming for Enterprise Guide® Users

Book Description

In this pragmatic, example-driven book, author Neil Constable demonstrates how you can use SAS code to enhance the capabilities of SAS Enterprise Guide. Designed to help you gain extra value from the products you already have, SAS Programming for Enterprise Guide Users contains tips and techniques that show you a variety of features that cannot be accessed directly through the task interfaces. In all cases, techniques are shown with examples that you can try and test, plus additional exercises are included to give you more practice. The end result is more efficient and resilient use of SAS Enterprise Guide in a wider variety of business areas.

Included is a discussion of the following subject areas:

  • the Output Delivery System

  • advanced formatting

  • macro variables and macros

  • advanced reporting using PROC REPORT

  • highlighting in reports

  • hyperlinking between reports and graphs

  • data manipulation using SQL

  • data manipulation using the DATA step

  • extended graphics

By adding small amounts of code in key areas, SAS Enterprise Guide users can get more out of the product than the tasks reveal. Users should be familiar with the SAS Enterprise Guide user interface and tasks. No programming experience is necessary.

Table of Contents

  1. Praise from the Experts
  2. Copyright
  3. Foreword
  4. Acknowledgments
  5. 1. Why Do I Need to Write Code?
    1. 1.1. Introduction
    2. 1.2. A Brief History of a
      1. 1.2.1. SAS: A Complete Programming Language
      2. 1.2.2. SAS Enterprise Guide: A Graphical User Interface for SAS
      3. 1.2.3. So How Does SAS Enterprise Guide Work?
    3. 1.3. Examples of Enhancing the Generated Code
    4. 1.4. Examples of Writing Your Own Code
    5. 1.5. Summary
  6. 2. Understanding Coding with SAS Enterprise Guide
    1. 2.1. Introduction
    2. 2.2. The Structure of a SAS Program
      1. 2.2.1. Writing Your Own Code: The Code Node
      2. 2.2.2. Using and Customizing the Code Window
      3. 2.2.3. The Code Node in Process Flow Diagrams
    3. 2.3. Understanding Generated Code
    4. 2.4. Complementing the Generated Code
      1. 2.4.1. Adding Code to the SAS Enterprise Guide Start-up File
      2. 2.4.2. Adding Code before or after a Task or Code
      3. 2.4.3. Inserting Code into a Task
      4. 2.4.4. Using Generated Code as a Template
    5. 2.5. Summary
    6. 2.6. Exercises
  7. 3. Getting Started
    1. 3.1. Introduction
    2. 3.2. Getting Ready to Face the World
      1. 3.2.1. We Know Where You Live
      2. 3.2.2. Formats and Functions
      3. 3.2.3. A Final Word on Options
    3. 3.3. Query-Free Filtering
    4. 3.4. Do It Once—Use It Often
      1. 3.4.1. Using Macro Variables
      2. 3.4.2. Using Macro Functions
    5. 3.5. ODS: The Output Delivery System
      1. 3.5.1. What Is ODS All About?
      2. 3.5.2. Making Your Output Go Where You Want
    6. 3.6. Summary
    7. 3.7. Exercises
  8. 4. Data Manipulation Part 1: Queries
    1. 4.1. Introduction
    2. 4.2. What Is SQL?
    3. 4.3. Basic Queries: What SAS Enterprise Guide Does Already
    4. 4.4. The Filter and Query Task
    5. 4.5. The Delete Data Sets and Formats Task
    6. 4.6. The Append Data Task
    7. 4.7. Indexes: Creation and Usage
    8. 4.8. Index Creation
    9. 4.9. Index Usage
      1. 4.9.1. Good Index, Bad Index
    10. 4.10. Updating and Validating Data
      1. 4.10.1. Deleting Rows
    11. 4.11. Inserting Rows
    12. 4.12. Updating
    13. 4.13. Integrity Checks
    14. 4.14. Advanced SQL Queries
    15. 4.15. Summary
    16. 4.16. Where to Look for More Information
    17. 4.17. Exercises
  9. 5. Data Manipulation Part 2: DATA Step and Functions
    1. 5.1. Introduction
    2. 5.2. DATA Step Basics
    3. 5.3. Creating Multiple Tables
    4. 5.4. When Position Matters
    5. 5.5. SAS Functions
    6. 5.6. Summary
    7. 5.7. Where to Look for More Information
    8. 5.8. Exercises
  10. 6. Seeing Data Differently
    1. 6.1. Introduction
    2. 6.2. Basic Formats: The Create Formats Task
    3. 6.3. Reviewing Existing Formats
    4. 6.4. Creating Picture Formats
      1. 6.4.1. Formatting Numbers
      2. 6.4.2. Formatting Dates and Times
    5. 6.5. Multilabel Formats
    6. 6.6. Using Formats as Look-up Tables
    7. 6.7. Creating Informats
    8. 6.8. Summary
    9. 6.9. Where to Look for More Information
    10. 6.10. Exercises
  11. 7. Enhancing Report Output
    1. 7.1. Introduction
    2. 7.2. More ODS
    3. 7.3. Improving Titles
      1. 7.3.1. Improving BY Lines
      2. 7.3.2. Page Numbers
      3. 7.3.3. Basic Formatting
    4. 7.4. Adding Hyperlinks
    5. 7.5. One-Stop Reporting
      1. 7.5.1. Hyperlinks Revisited
    6. 7.6. Trafficlighting
    7. 7.7. Documents, The ODS Waiting Room
      1. 7.7.1. Combining Output
      2. 7.7.2. Varying Output
    8. 7.8. Summary
    9. 7.9. Where to Look for More Information
    10. 7.10. Exercises
  12. 8. Graphical Output
    1. 8.1. Introduction
    2. 8.2. SAS Enterprise Guide Graphical Output
    3. 8.3. Enhancing SAS Enterprise Guide Graphs
      1. 8.3.1. More Linking
      2. 8.3.2. Exploding Pies
      3. 8.3.3. Detail Pies
    4. 8.4. Extra SAS Graphical Output
    5. 8.5. Summary
    6. 8.6. Where to Look for More Information
    7. 8.7. Exercises
  13. 9. Macros: Reusable Programming
    1. 9.1. Introduction
    2. 9.2. What Is a Macro?
    3. 9.3. Converting a Program to a Macro
    4. 9.4. Converting a Task to a Macro
    5. 9.5. Including Macros
    6. 9.6. The Biggest Exploding Pie
    7. 9.7. Summary
    8. 9.8. Where to Look for More Information
    9. 9.9. Exercises
  14. A. Directory of Procedures Supported by SAS Enterprise Guide
    1. A.1. Directory of Procedures
    2. A.2. Task Cross-Reference
    3. A.3. Category Cross-Reference
  15. B. Selected Additional SAS Procedures
  16. C. Data Used in This Book
  17. D. Solutions to Exercises