The Little SAS Book Fourth Ed
Original Publication Date: 2008-Dec-31
Included in the Prior Art Database: 2015-Nov-09
SAS Institute Inc.
Page 01 of 376
a p r i m e r
F o u r t h e d i t i o n
Lora D. Delwiche and Susan J. Slaughter
Page 02 of 376
The correct bibliographic citation for this manual is as follows: Delwiche, Lora D., and Susan J. Slaughter. 2008. The Little SAS® Book: A Primer, Fourth Edition. Cary, NC: SAS Institute Inc.
The Little SAS® Book: A Primer, Fourth Edition
Copyright © 2008, SAS Institute Inc., Cary, NC, USA
All rights reserved. Produced in the United States of America.
For a hard-copy book: 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.
For a Web download or e-book: Your use of this publication shall be governed by the terms established by the vendor at the time you acquire this publication.
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, July 2008
2nd printing, May 2009
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/publishing 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.
Other brand and product names are registered trademarks or trademarks of their respective companies.
Page 03 of 376
Acknowledgments ix Introducing SAS Software x About This Book xi
What's New xiv
Chapter 1 Getting Started Using SAS Software 1
1.1 The SAS Language 2
1.2 SAS Data Sets 4
1.3 The Two Parts of a SAS Program 6
1.4 The DATA Step's Built-in Loop 8
1.5 Choosing a Mode for Submitting SAS Programs 10
1.6 Windows and Commands in the SAS Windowing Environment 12
1.7 Submitting a Program in the SAS Windowing Environment 14
1.8 Reading the SAS Log 16
1.9 Viewing Your Results in the Output Window 18
1.10 Creating HTML Output 20
1.11 SAS Data Libraries 22
1.12 Viewing Data Sets in the Viewtable Window 24
1.13 Viewing the Properties of Data Sets with SAS Explorer 26
1.14 Using SAS System Options 28
Chapter 2 Getting Your Data into SAS 31
2.1 Methods for Getting Your Data into SAS 32
2.2 Entering Data with the Viewtable Window 34
2.3 Reading Files with the Import Wizard 36
2.4 Telling SAS Where to Find Your Raw Data 38
2.5 Reading Raw Data Separated by Spaces 40
2.6 Reading Raw Data Arranged in Columns 42