Transcription of SAS Guide to Applications Development
1 SAS Guide to Applications Development Second EditionSAS DocumentationThe correct bibliographic citation for this manual is as follows: SAS Institute Inc. Guide to Applications Development , Second Edition. Cary, NC: SAS Institute Guide to Applications Development , Second EditionCopyright 2004 , SAS Institute Inc., Cary, NC, USAISBN 978-1-59047-400-6 All rights reserved. Produced in the United States of a hard-copy book:No part of this publication may be reproduced, stored in aretrieval system, or transmitted, in any form or by any means, electronic, mechanical,photocopying, or otherwise, without the prior written permission of the publisher, SASI nstitute a Web download or e-book:Your use of this publication shall be governed by theterms established by the vendor at the time you acquire this Government Restricted Rights , duplication, or disclosure of thissoftware and related documentation by the government is subject to the Agreementwith SAS Institute and the restrictions set forth in FAR Commercial ComputerSoftware-Restricted Rights (June 1987).
2 SAS Institute Inc., SAS Campus Drive, Cary, North Carolina electronic book, October 20072nd electronic book, March 20081st printing, January 20042nd printing, March 2008 SAS Publishing provides a complete selection of books and electronic products to helpcustomers use SAS software to its fullest potential. For more information about oure-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web call and all other SAS Institute Inc. product or service names are registered trademarksor trademarks of SAS Institute Inc. in the USA and other countries. indicates brand and product names are registered trademarks or trademarks of theirrespective the SAS Applications Development Environment 1 Chapter 1 Overview 3 SAS Applications Development and This Book3 Other Information Sources4 Chapter 2 Introducing the Applications Development Environment 7 Two Environments for Applications Development7 What Is SAS/EIS Software?
3 8 What Is SAS/AF Software?9 SAS Component Language10 Chapter 3 Applications Development Methodology 13 Using SAS Tools to Develop Applications13 Steps to Developing SAS/EIS Applications14 Steps to Developing SAS/AF Applications16 PART2 Developing Enterprise Information Systems 21 Chapter 4 Tools for the Business User or Applications Developer 23 Introduction23 About the SAS/EIS Development Environment23 SAS/EIS Objects29 Chapter 5 Preparing Data for Your Ready-Made Applications 31 Introduction31 About the Metabase Facility32 Objects That Require Metabase Registrations40 Presummarizing Your Data42 Registering an MDDB52 Registering a Summarized Table53 About SAS/MDDB Server Software54 Introducing Distributed Multidimensional Metadata54 Chapter
4 6 Extending Ready-Made Applications 57 Introduction57 Understanding the SAS/EIS Flow of Control57 Subclassing Viewers61 Overriding Methods69 Chapter 7 Deploying an Enterprise Information System 75 Deploying SAS/EIS Applications75ivUsing the EIS Command75 Using the RUNEIS Command76 Making SAS/EIS Applications Run Smoothly77 Managing Your SAS/EIS Files77 PART3 Developing Applications 81 Chapter 8 Tools for the Applications Developer 83 About the SAS/AF Development Environment83 Build Window85 Components Window86 Components86 Properties Window87 Source Window87 Chapter 9 Developing Frames with Ready-Made Objects 89 Introduction89 Working with Frames90 Selecting Components92Re-using Components94 Defining Attachments to Enable Automatic Component Resizing95 Chapter 10 Communicating with Components 97 Introduction97 Attribute Linking97 Model/View Communication99 Drag and Drop Communication101 Chapter 11 Adding SAS Component Language Programs to Frames 105 Introduction105 Tips for Working with Frames and SCL106 Constructing a Frame SCL Program107 Controlling the Execution of SCL Programs111 Calling Other Entries and Opening Windows113 Compiling and Testing Applications115 Debugging and Optimizing Your Applications116 Saving and Storing Frame SCL Programs118 Chapter 12 Adding Application Support Features 119 Implementing Custom Menus119 Adding Online Help to Your Applications121 Chapter 13 Deploying Your Applications 125 Application
5 Deployment Issues125 Migrating Your Application from Testing to Production125 Configuring a SAS Session for Your Application128 Enabling the Application for Your Users131vPART4 Developing Custom Components 133 Chapter 14 Tools for the Component Developer 135 Introduction135 Class Editor135 Resource Editor136 Interface Editor136 Source Window137 Other Development Tools and Utilities137 Chapter 15 SAS Object-Oriented Programming Concepts 139 Introduction139 Object-Oriented Development and the SAS Component Object Model140 Classes141 Methods144 Attributes151 Events158 Event Handlers159 Interfaces161 Chapter 16 Developing Components 163 Creating Your Own Components163 Creating a Class with SCL168 Using SCL to Instantiate Classes174 Chapter 17 Managing Methods 179 Implementing Methods with SCL179 Overriding Frame Methods to Augment SCL Labeled Sections184 Chapter 18 Managing Attributes 187 Specifying a Component s Default Attribute187 Validating the Values of Character Attributes188 Assigning an Editor to an Attribute189 Adding a Custom Attributes Window to a Component191 Assigning a Custom Access Method (CAM)
6 To an Attribute193 Using the Refresh Attributes Event197 Using List Attributes200 Chapter 19 Adding Communication Capabilities to Components 203 Introduction203 Enabling Attribute Linking204 Implementing Model/View Communication207 Enabling Drag and Drop Functionality212 Modifying or Adding Event Handling221 Chapter 20 Deploying Components 223 Introduction223viManaging Classes with Resources224 Making a New Class Available for Use226 Generating Class Documentation with GenDoc227 PART5 Appendices 231 Appendix 1 Flow of Control 233 How SCL Programs Execute for FRAME Entries233 Flow of Control for Frame SCL Entries239 Appendix 2 Adding Attachments to Frame Controls 247 Introduction247 Selecting the Attachment Mode247 Initiating Define Attachment Mode249 Selecting the Direction and Type for the Attachment250 Making the Attachments253 Defining Attachments to Sibling Components255 Defining Attachments to Components That Have Borders256 Moving Multiple Components That Include Attachments256 Restricting Component Size257 Changing and/or Deleting an Attachment258 Displaying Attachments259 Situations in Which an Attachment Is Ignored259 Errors and Error Handling260 Tips for Using Attachments260 Appendix 3 Working with SAS/AF and SAS/EIS Keys in the SAS Registry 263 About the SAS Registry263 SAS Registry Editor263 Modifying the Registry Settings for SAS/AF Software264 Modifying the Registry Settings for SAS/EIS Software265 Appendix 4 Moving
7 Legacy Classes to the SAS Component Object Model 267 Introduction267 Creating New Components from Legacy Classes267 Attributes and Instance Variables268 Working with Custom Attributes Windows for Legacy Classes270 Using Drag and Drop Operations with Legacy Classes271 Appendix 5 Understanding SAS/EIS Metadata Attributes 275 About SAS/EIS Metadata Attributes275 About Attribute Dictionaries275 User-Defined Attributes in SAS/EIS Software276 Appendix 6 Handling Events in SAS/EIS Legacy Objects 279 Communication between Legacy Objects279 Glossary 287 Index 2951 PART1 Introducing the SAS ApplicationsDevelopment the Applications Development Development Methodology1323 CHAPTER1 OverviewSAS Applications Development and This Book3 Other Information Sources4 Online Help for SAS/AF and SAS/EIS Software5 SAS Applications Development and This BookSAS offers Applications Development tools that can be integrated with the featuresand functionality of other SAS software products.
8 There are two types of applicationsdevelopers who may want to take advantage of these tools: The sophisticated business user. Increasingly, Applications are developed bytechnically adept users within business units. These business units may require asmall application that serves local purposes and SAS information delivery software is perfectly suited for these business users. The IS or IT Applications information systems departmentslook for tools to help them deploy enterprise-wide Applications . These applicationsare designed to meet the needs of several business units or the entire software provides the functionality required to build Applications on , the needs of these two groups overlap. The application built by thesophisticated business user succeeds on its small scale, but over time it becomes amaintenance burden and a technical challenge as the requirements expand.
9 CorporateIS may then take on responsibility for the support and enhancement of theseapplications, or even use them as blueprints to create their enterprise-wide these Applications involve sophisticated reporting and online analyticalprocessing (OLAP). In other cases, the application requirements extend into decisionsupport, or they may involve extending the functionality of other SAS software approaches to developing the Applications may also involve two types ofdevelopers: The component components are an integral part of anorganization s commitment to object-oriented design and component component designer (or class writer) defines the component architecture andcreates the class libraries that an organization uses to build its Applications .
10 The application using the components supplied by SAS or customizedby the component designer, the application developer creates Other Information Sources Chapter 1 This book combines the two approaches to Applications Development to provide asingle resource for developing Applications with SAS software for all types ofapplications developers. The book is divided into five parts:Part I: Introducing the SAS Applications Development EnvironmentThe remaining chapters in this section provide an introduction to SAS/EIS andSAS/AF software and detail the Applications Development environment. Inaddition, this section presents a basic methodology for developing systems withSAS Applications Development II: Developing Enterprise Information SystemsPart II is designed to meet the needs of thesophisticated business userorapplications developerwho wants to build enterprise information systems.