SAS/ASSIST ® 9.1 the Correct Bibliographic Citation for This Manual Is As Follows: SAS Institute Inc
Total Page:16
File Type:pdf, Size:1020Kb
Getting Started with SAS/ASSIST ® 9.1 The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2004. Getting Started with SAS/ASSIST ® 9.1. Cary, NC: SAS Institute Inc. Getting Started with SAS/ASSIST® 9.1 Copyright © 2004, SAS Institute Inc., Cary, NC, USA ISBN 1–59047–205–5 All rights reserved. Produced in the United States of America. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc. U.S. Government Restricted Rights Notice. Use, duplication, or disclosure of this software and related documentation by the U.S. government is subject to the Agreement with SAS Institute and the restrictions set forth in FAR 52.227–19, Commercial Computer Software-Restricted Rights (June 1987). SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513. 1st printing, January 2004 SAS Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. For more information about our e-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web site at support.sas.com/pubs or call 1-800-727-3228. SAS® and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. IBM® and all other International Business Machines Corporation product or service names are registered trademarks or trademarks of International Business Machines Corporation in the USA and other countries. Other brand and product names are trademarks of their respective companies. Contents Chapter 1 R Introducing SAS and SAS/ASSIST Software 1 What is SAS? 1 SAS/ASSIST Software 2 The SAS/ASSIST WorkPlace Environment 3 Conventions Used in This Document 6 Quick Start 7 Chapter 2 R Familiarizing Yourself with SAS and SAS/ASSIST Software 11 Overview of Familiarizing Yourself with SAS and SAS/ASSIST Software 11 The SAS User Interface 12 The SAS/ASSIST User Interface 17 Chapter 3 R Report Writing 31 Overview of Report Writing 31 Producing a Listing Report 32 Producing a Tabular Report 41 Producing a Frequency Report 45 Chapter 4 R Graphics 49 Overview of Graphics 49 Producing a Bar Chart 50 Producing a Pie Chart 53 Producing a Plot 56 Producing a Map 59 Chapter 5 R Saving and Using Task Window Selections 63 Overview of Saving and Using Task Window Selections 63 Task Window Selections 63 Setting Up and Using a Private Menu 67 Chapter 6 R Using the Result Manager 71 Overview of the Result Manager 71 Accessing the Result Manager Window 71 Organizing the Entries in the Result Manager Window 72 Using Commands to Manipulate Entries 73 Exiting the Result Manager 73 Chapter 7 R Editing and Browsing Data 75 Overview of Editing and Browsing Data 75 Editing Data in a Tabular Format 76 Editing Data One Row at a Time 86 Chapter 8 R Sorting Data 93 iv Overview of Sorting Data 93 Sorting Data 94 Chapter 9 R Defining a New Column 101 Overview of Defining a New Column 101 Defining a New Column 101 Chapter 10 R Saving Source Code for Editing and Re-execution 111 Overview of Saving and Using Source Code 111 Working With Source Code 111 Chapter 11 R Setting Up SAS Files 117 Overview of Setting Up SAS Files 117 SAS Files 117 Setting Up SAS Files 121 Chapter 12 R Entering Data Interactively 125 Overview of Entering Data 125 Entering Data 125 Chapter 13 R Importing and Exporting External Data 131 Overview of Importing and Exporting Data 131 Exporting a File 131 Importing Data from a Flat File 134 Chapter 14 R Analyzing Data 141 Overview of Data Analysis 141 Analyzing Data 142 Chapter 15 R Using the Report Engine 145 Overview of the Report Engine 145 Creating and Modifying a Simple List Report 145 Creating a Dynamic Report 151 Chapter 16 R Using Remote Connect 159 Overview of Remote Connect 159 Establishing a Remote Connection 159 Transferring Data 162 Executing a SAS/ASSIST Task Using Remote Data 166 Terminating a Connection 167 Appendix 1 R Frequently Asked SAS/ASSIST Software Questions 169 Overview of Frequently Asked Questions 169 Licensing, Hardware, and Software Requirements 169 Platforms and Operating Environments 171 Tables and Files 172 SAS/ASSIST Tasks 173 Appendix 2 R SAS/ASSIST Software Setup 175 v Overview of SAS/ASSIST Software Setup 175 Setting Up Graphics Devices 175 Setting Up Remote Connect Configurations 177 Adding a SAS/ASSIST Button to Your Toolbox 178 Appendix 3 R Recommended Reading 181 Recommended Reading 181 Glossary 183 Index 191 vi 1 CHAPTER 1 Introducing SAS and SAS/ASSIST Software What is SAS? 1 Data Access 2 Data Management 2 Data Analysis 2 Data Presentation 2 SAS/ASSIST Software 2 The SAS/ASSIST WorkPlace Environment 3 Buttons on the WorkPlace Menu 4 Data Management 4 Report Writing 4 Graphics 4 Data Analysis 4 Planning Tools 5 Enterprise Information System 5 Remote Connect 5 Results 5 Setup 5 Index 6 Exit 6 WorkPlace Menu Bar Items 6 File 6 Edit 6 View 6 Tools 6 Run 6 Tasks 6 Help 6 Conventions Used in This Document 6 Quick Start 7 What is SAS? SAS is a modular, integrated, hardware-independent system of software for enterprise-wide information delivery. What distinguishes the software is its ability to make enterprise data a generalized resource available to any user or application that requires it, regardless of the source of the data. transform enterprise data into meaningful information for a broad range of applications. 2 Data Access R Chapter 1 deliver critical information through a variety of interfaces that are tailored to the needs and experience of the individual user. perform consistently across a broad range of hardware environments while exploiting the particular advantages of each environment. SAS integrates all of these elements into a powerful software system. SAS views virtually any application as a collection of data-driven tasks or processes that can be generally classified as described in the following sections. Data Access Data access is the process of accessing the data required by the application. SAS treats enterprise data as an available resource by providing transparent access to popular database management systems such as DB2, IMS, INGRES, SYBASE, ORACLE, and DEC Rdb. flat files, system-specific files, and other historical or “legacy” data types SAS’ own relational data structure. Through SAS’ Multiple Engine Architecture (MEA), these data sources can be combined to provide an enterprise Data Warehouse that gives end users the information they need to do their jobs without jeopardizing the security and integrity of data assets or negatively affecting the performance of production databases. Data Management Data management is the process of shaping data into a form required by the application. You can manage your data by entering, editing, retrieving, formatting, and converting your data. Data Analysis Data analysis is the process of transforming raw data into meaningful and useful information. You can analyze your data using descriptive statistics, multivariate techniques, forecasting and modeling, and linear programming. Data Presentation Data presentation is the process of communicating information in ways that clearly demonstrate its significance. You can present your data by using reports, business and analytical graphics, and business correspondence. SAS/ASSIST Software SAS/ASSIST software is a menu-driven, task-oriented interface to the SAS System. It enables users of all experience levels to access the power of the SAS System without having to learn SAS programming statements. SAS/ASSIST software enables you to perform tasks efficiently by using templates and menus. The way each task works within SAS/ASSIST software is similar. After you master one task, other tasks are easy to complete. Introducing SAS and SAS/ASSIST Software R The SAS/ASSIST WorkPlace Environment 3 SAS/ASSIST software helps you complete tasks easily by providing features that, for example, identify required fields and display selection lists to prevent user errors. Once you have set up a task, you can save task window selections and run the same task again in a later session. In the background, SAS/ASSIST software automatically generates SAS code with descriptive comments as it performs many of your tasks. You can save, edit, and re-execute this code. The SAS/ASSIST Result Manager enables you to manage your saved tasks and code. With SAS/ASSIST software, you have a single tool to help you complete many different types of tasks, including end-user reporting, presentation graphics, query and reporting, and decision support. The data access capabilities of SAS enable you to use data stored in almost any format or location, ranging from flat files to PC files and database management systems such as DB2, ORACLE, and IMS-DL/I. After you have accessed your data, SAS/ASSIST software gives you a variety of ways to store, manipulate, and transfer data. Additionally, you can combine code that is generated by SAS/ASSIST software with predefined objects and SAS Component Language (SCL) to create applications. SAS/ASSIST software also enables you to customize your environment to accommodate individual and group preferences by setting options in Master, Group, and User profiles. For example, you can use a private menu to add or remove direct access to saved SAS/ASSIST tasks and to specific windows. SAS/ASSIST software includes an online tutorial, which contains instructions for performing commonly used SAS/ASSIST tasks. You can access the tutorial by selecting Help from the menu bar and then selecting Getting Started with SAS/ASSIST.