As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

SAS® Server Pages: Generating Dynamic Content

From sasCommunity
Jump to: navigation, search

Title: SAS® Server Pages: Generating Dynamic Content

Author(s): Don Henderson


SAS® Server Pages: Generating Dynamic Content is an e-Book that addresses and expands upon SAS Server Pages leveraging a new SAS 9.4 procedure: PROC STREAM (also available as an experimental procedure in 9.3). SAS Server Pages were introduced in the SAS Press book Building Web Applications with SAS/IntrNet: A Guide to the Application Dispatcher.

The current list of topics/chapters is listed below.

Please use the discussion tab to ask questions or make suggestions about the proposed content.

List of Chapters/Sections

  1. Introduction
    1. The STREAM Procedure - Processing SAS Server Pages
    2. Guide to Reading This Book
  2. A Dynamic Content Generation Framework
    1. A Portal Reporting Framework
    2. Data Entry
    3. Report Generation
    4. Next Steps
  3. Dynamic Content Generation Using the Macro Facility and the STREAM Procedure
    1. The SAS Macro Language - A Text Processing Language
    2. Macro Variables for Text Substitution
    3. Macros for Iterative and Conditional Text Generation
    4. Including Text from External Files
    5. Generating Dynamic Content from a SAS Data Set
    6. Executing SAS Code in a STREAM Procedure Input File
  4. Generate a Document for Each Observation in a SAS Data Set
    1. A Single Document as an HTML File
    2. A Separate HTML File for Each Observation
    3. Generating a Document for Each Observation as an RTF File
    4. Next Steps
  5. Create a Custom User Interface for a Stored Process
    1. The sasServerPage Stored Process
    2. The runMacro Stored Process
    3. Using the sasServerPage and runMacro Stored Processes to Create Prompt Pages
    4. Next Steps
  6. A Sample Web-Based Data Entry Facility
    1. Process Flow
    2. The Data Entry SAS Server Page
    3. The Header Page
    4. The Trailer Page
    5. The Data Entry Macros
    6. Next Steps
  7. Excel Output as an XML Spreadsheet
    1. A Simple Excel Report
    2. Separate Worksheets for Each Product
    3. Next Steps
  8. Producing a Tree View of a SAS Data Set
    1. A Drillable Report for Any Given SAS Data Set
    2. A Tree View Menu System
    3. Next Steps
  9. Next Generation Web: Leveraging HTML5 and More
    1. Validation in Data Entry Screens
    2. Stored Process Prompting
    3. Dynamic Graphical Output
    4. Next Steps

SAS Server Page/PROC STREAM Blog Entries

Check out the following blog entries that talk about the book and PROC STREAM. This list will be regularly updated (most recent listed first):

Sample Code

The sample code (a zip file) for the book can be downloaded from the SAS Press Book Page. It is also available as a zip file from

Please watch this page to be notified of updates.


Some of the examples require the version of PROC STREAM that will ship with SAS 9.3M2. See Generating SAS Server Pages in different Releases of SAS for details about getting the updated version of PROC STREAM.


Rick Langston presented a good overview of PROC STREAM as a Super Demo at SAS Global Forum 2012.