Anda di halaman 1dari 2

Example Code and Data for Learning SAS by Example: A Programmer's Guide by Ron Cody

Copyright 2007 by SAS Institute Inc., Cary, NC, USA ISBN 978-1-59994-165-3 This material is provided "as is" by SAS Institute Inc. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. The Institute is not responsible for errors in this material as it now exists or will exist, nor does the Institute provide technical support for it.

Creating the Data Sets for this Book


Note that you will need to run the Create_Datasets.sas located in the ZIP file in order to generate the data sets for this book. Instructions for generating the data sets are in the following table: Filename Create_Datasets.sas Explanation This file creates all the SAS data sets used in the programs and problems in the book. Run this SAS program to create the data sets. Remember to edit all the LIBNAME and INFILE statements to point to the folder where you store the data files and where you want to store your permanent SAS data sets. This file contains the solutions to the odd-numbered problems that are included at the end of each chapter in the book. This file contains the SAS programs that are used in the book. This file contains either the data (which you need to cut-and-paste) or the SAS programs that you need to run to create the SAS data sets that are used in the problems in the book. These files are used by the programs and problems in the book. These files are used by the programs and problems in the book.

Answers to Odd Problems.sas Programs used in book.sas Programs used in problems.sas

All TXT files All CSV and XLS files

Accessing the Code and Data Files


1. The sample code and data for Learning SAS by Example: A Programmer's Guide is available in a ZIP file located here: http://support.sas.com/publishing/bbu/zip/60864.zip 2. 3. Copy all the .sas files to a folder on your hard drive. Before you run any of the SAS programs (such as Create_Datasets.sas), you need to use the SAS Editor (or any other editor) to search for the folder used in the book (c:\books\learning) and replace c:\books\learning with the name of the folder where you copied these files and where you want to store your permanent SAS programs. This step changes all the LIBNAME and INFILE statements in these programs. For example, if you copied all the files to a folder on your hard drive named c:\learn, and you want to run the Create_Datasets.sas program, you would do the following:

4.

a. Start a SAS session. b. Open the Create_Datasets.sas file. c. From the menu, select Edit->Replace. d. In the Find box, type c:\books\learning. e. In the Replace box, type c:\learn. f. Select Replace All. g. Save the edited program. h. Submit the edited program.

Questions or Comments
Questions or comments concerning this material may be sent to the author at this address: SAS Institute Inc. SAS Press Attn: Ron Cody SAS Campus Drive Cary, NC 27513 Or you can send email to: saspress@sas.com. Use Comments for Ron Cody for the subject field.