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 Server Pages

Book Description

SAS Server Pages have been used by SAS developers as a way of creating custom user interfaces for Web-based applications. This enhanced book offers information on how to create SAS Server Pages using the SAS 9.3 experimental procedure PROC STREAM, providing users with a foundation technology that greatly expands the capabilities of SAS for dynamic and rich content generation. By combining PROC STREAM and the Macro facility, SAS can now more easily generate any type of markup or text-based content such as HTML, XML, and CSV. Exclusively available in electronic format, this book provides more extensive and flexible ways to develop applications using video examples of a wide range of PROC STREAM and SAS Server Pages techniques, including both Web applications and Base SAS implementations. Users can see results immediately and can access additional content and information online through embedded links. It also offers basic how-to documentation on PROC STREAM and an overview of a Portal Reporting Framework that illustrates creating custom user interfaces for stored processes within the SAS Portal. Ideal for SAS programmers who have some knowledge of the Macro facility as well as BI users, SAS Server Pages: Generating Dynamic Content removes the difficulties associated with HTML-based content creation while providing a resource on using PROC STREAM in a dynamic, enhanced format.

Table of Contents

  1. Title Page
  2. Copyright
  3. Chapter 1: Introduction
    1. 1.1 The STREAM Procedure—Processing SAS Server Pages
    2. 1.2 Guide to Reading This Book
  4. Chapter 2: A Dynamic Content Generation Framework
    1. 2.1 A Portal Reporting Framework
      1. 2.1.1 Architectural Overview
      2. 2.1.2 Demonstration
    2. 2.2 Custom User Interfaces
      1. 2.2.1 Selecting a Report
      2. 2.2.2 Specifying Global Filters
    3. 2.3 Data Entry
    4. 2.4 Report Generation
    5. 2.5 Next Steps
  5. Chapter 3: Dynamic Content Generation Using the Macro Facility and the STREAM Procedure
    1. 3.1 The SAS Macro Language - A Text Processing Language
    2. 3.2 Macro Variables for Text Substitution
    3. 3.3 Macros for Iterative and Conditional Text Generation
    4. 3.4 Including Text from External Files
    5. 3.5 Generating Dynamic Content from a SAS Data Set
    6. 3.6 Executing SAS Code in a STREAM Procedure Input File
      1. 3.6.1 Using Autocall Macros for Common Functions
  6. Chapter 4: Generate a Document for Each Observation in a SAS Data Set
    1. 4.1 A Single Document as an HTML File
      1. 4.1.1 Output File Logical Record Length
    2. 4.2 A Separate HTML File for Each Observation
    3. 4.3 Generating a Document for Each Observation as an RTF File
      1. 4.3.1 Creating RTF SAS Server Pages
    4. 4.4 Next Steps
  7. Chapter 5: Create a Custom User Interface for a Stored Process
    1. 5.1 The sasServerPage Stored Process
    2. 5.2 The runMacro Stored Process
    3. 5.3 Using the sasServerPage and runMacro Stored Processes to Create Prompt Pages
      1. 5.3.1 The stpHeader SAS Server Page
      2. 5.3.2 The stpTrailer SAS Server Page
      3. 5.3.3 The getDistinct Macro
      4. 5.3.4 The generateOptionTag Macro
    4. 5.4 Next Steps
  8. Chapter 6: A Sample Web-Based Data Entry Facility
    1. 6.1 Process Flow
    2. 6.2 The Data Entry SAS Server Page
    3. 6.3 The Header Page
    4. 6.4 The Trailer Page
    5. 6.5 The Data Entry Macros
      1. 6.5.1 The listRowsToUpdate Macro
      2. 6.5.2 The generateDataEntrySSP Macro
      3. 6.5.3 The applyDataEntrySSP Macro
    6. 6.6 Next Steps
  9. Chapter 7: Excel Output as an XML Spreadsheet
    1. 7.1 A Simple Excel Report
    2. 7.2 Separate Worksheets for Each Product
    3. 7.3 Next Steps
  10. Chapter 8: Producing a Tree View of a SAS Data Set
    1. 8.1 A Drillable Report for Any Given SAS Data Set
      1. 8.1.1 Creating a Drillable Tree View Data Set
      2. 8.1.2 The summaryAsTree and treeNodes Macros
    2. 8.2 A Tree View Menu System
    3. 8.3 Next Steps
  11. Chapter 9: Next Generation Web: Leveraging HTML5 and More
    1. 9.1 Validation in Data Entry Screens
    2. 9.2 Stored Process Prompting
      1. 9.2.1 The Sparklines SAS Server Page
      2. 9.2.2 The scaleData Macro
      3. 9.2.3 The sparklines Macro
    3. 9.3 Dynamic Graphical Output
      1. 9.3.1 The PieChart SAS Server Page
      2. 9.3.2 The generatePieChartTable Macro
      3. 9.3.3 Alternative Packaging
    4. 9.4 Next Steps
  12. Appendix
  13. Accelerate Your SAS Knowledge with SAS Books